Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add name_prefix argument for WAFv2 resources #40889

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rbreslow
Copy link

@rbreslow rbreslow commented Jan 13, 2025

Description

This PR builds off #33206, which added name_prefix support to aws_wafv2_rule_group, to add name_prefix support to the rest of the WAFv2 resources. Also, I added RegEx validation to the name argument that was missing for _ip_set and _regex_pattern_set.

Relations

Relates #40740 (allows you to use create_before_destroy to work around this import bug)

Output from Acceptance Testing

I ran all acceptance tests that start with TestAccWAFV2:

$ make testacc TESTARGS='-run=TestAccWAFV2' PKG=wafv2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/wafv2/... -v -count 1 -parallel 20  -run=TestAccWAFV2 -timeout 360m
2025/01/13 09:29:13 Initializing Terraform AWS Provider...
=== RUN   TestAccWAFV2IPSetDataSource_basic
=== PAUSE TestAccWAFV2IPSetDataSource_basic
=== RUN   TestAccWAFV2IPSet_basic
=== PAUSE TestAccWAFV2IPSet_basic
=== RUN   TestAccWAFV2IPSet_nameGenerated
=== PAUSE TestAccWAFV2IPSet_nameGenerated
=== RUN   TestAccWAFV2IPSet_namePrefix
=== PAUSE TestAccWAFV2IPSet_namePrefix
=== RUN   TestAccWAFV2IPSet_disappears
=== PAUSE TestAccWAFV2IPSet_disappears
=== RUN   TestAccWAFV2IPSet_ipv6
=== PAUSE TestAccWAFV2IPSet_ipv6
=== RUN   TestAccWAFV2IPSet_minimal
=== PAUSE TestAccWAFV2IPSet_minimal
=== RUN   TestAccWAFV2IPSet_changeNameForceNew
=== PAUSE TestAccWAFV2IPSet_changeNameForceNew
=== RUN   TestAccWAFV2IPSet_addresses
=== PAUSE TestAccWAFV2IPSet_addresses
=== RUN   TestAccWAFV2IPSet_tags
=== PAUSE TestAccWAFV2IPSet_tags
=== RUN   TestAccWAFV2IPSet_large
=== PAUSE TestAccWAFV2IPSet_large
=== RUN   TestAccWAFV2RegexPatternSetDataSource_basic
=== PAUSE TestAccWAFV2RegexPatternSetDataSource_basic
=== RUN   TestAccWAFV2RegexPatternSet_basic
=== PAUSE TestAccWAFV2RegexPatternSet_basic
=== RUN   TestAccWAFV2RegexPatternSet_nameGenerated
=== PAUSE TestAccWAFV2RegexPatternSet_nameGenerated
=== RUN   TestAccWAFV2RegexPatternSet_namePrefix
=== PAUSE TestAccWAFV2RegexPatternSet_namePrefix
=== RUN   TestAccWAFV2RegexPatternSet_disappears
=== PAUSE TestAccWAFV2RegexPatternSet_disappears
=== RUN   TestAccWAFV2RegexPatternSet_minimal
=== PAUSE TestAccWAFV2RegexPatternSet_minimal
=== RUN   TestAccWAFV2RegexPatternSet_changeNameForceNew
=== PAUSE TestAccWAFV2RegexPatternSet_changeNameForceNew
=== RUN   TestAccWAFV2RegexPatternSet_tags
=== PAUSE TestAccWAFV2RegexPatternSet_tags
=== RUN   TestAccWAFV2RuleGroupDataSource_basic
=== PAUSE TestAccWAFV2RuleGroupDataSource_basic
=== RUN   TestAccWAFV2RuleGroup_basic
=== PAUSE TestAccWAFV2RuleGroup_basic
=== RUN   TestAccWAFV2RuleGroup_nameGenerated
=== PAUSE TestAccWAFV2RuleGroup_nameGenerated
=== RUN   TestAccWAFV2RuleGroup_namePrefix
=== PAUSE TestAccWAFV2RuleGroup_namePrefix
=== RUN   TestAccWAFV2RuleGroup_updateRule
=== PAUSE TestAccWAFV2RuleGroup_updateRule
=== RUN   TestAccWAFV2RuleGroup_updateRuleProperties
=== PAUSE TestAccWAFV2RuleGroup_updateRuleProperties
=== RUN   TestAccWAFV2RuleGroup_byteMatchStatement
=== PAUSE TestAccWAFV2RuleGroup_byteMatchStatement
=== RUN   TestAccWAFV2RuleGroup_ByteMatchStatement_fieldToMatch
=== PAUSE TestAccWAFV2RuleGroup_ByteMatchStatement_fieldToMatch
=== RUN   TestAccWAFV2RuleGroup_changeNameForceNew
=== PAUSE TestAccWAFV2RuleGroup_changeNameForceNew
=== RUN   TestAccWAFV2RuleGroup_changeCapacityForceNew
=== PAUSE TestAccWAFV2RuleGroup_changeCapacityForceNew
=== RUN   TestAccWAFV2RuleGroup_changeMetricNameForceNew
=== PAUSE TestAccWAFV2RuleGroup_changeMetricNameForceNew
=== RUN   TestAccWAFV2RuleGroup_disappears
=== PAUSE TestAccWAFV2RuleGroup_disappears
=== RUN   TestAccWAFV2RuleGroup_RuleLabels
=== PAUSE TestAccWAFV2RuleGroup_RuleLabels
=== RUN   TestAccWAFV2RuleGroup_geoMatchStatement
=== PAUSE TestAccWAFV2RuleGroup_geoMatchStatement
=== RUN   TestAccWAFV2RuleGroup_GeoMatchStatement_forwardedIP
=== PAUSE TestAccWAFV2RuleGroup_GeoMatchStatement_forwardedIP
=== RUN   TestAccWAFV2RuleGroup_LabelMatchStatement
=== PAUSE TestAccWAFV2RuleGroup_LabelMatchStatement
=== RUN   TestAccWAFV2RuleGroup_ipSetReferenceStatement
=== PAUSE TestAccWAFV2RuleGroup_ipSetReferenceStatement
=== RUN   TestAccWAFV2RuleGroup_IPSetReferenceStatement_ipsetForwardedIP
=== PAUSE TestAccWAFV2RuleGroup_IPSetReferenceStatement_ipsetForwardedIP
=== RUN   TestAccWAFV2RuleGroup_logicalRuleStatements
=== PAUSE TestAccWAFV2RuleGroup_logicalRuleStatements
=== RUN   TestAccWAFV2RuleGroup_minimal
=== PAUSE TestAccWAFV2RuleGroup_minimal
=== RUN   TestAccWAFV2RuleGroup_regexMatchStatement
=== PAUSE TestAccWAFV2RuleGroup_regexMatchStatement
=== RUN   TestAccWAFV2RuleGroup_regexPatternSetReferenceStatement
=== PAUSE TestAccWAFV2RuleGroup_regexPatternSetReferenceStatement
=== RUN   TestAccWAFV2RuleGroup_ruleAction
=== PAUSE TestAccWAFV2RuleGroup_ruleAction
=== RUN   TestAccWAFV2RuleGroup_RuleAction_customRequestHandling
=== PAUSE TestAccWAFV2RuleGroup_RuleAction_customRequestHandling
=== RUN   TestAccWAFV2RuleGroup_RuleAction_customResponse
=== PAUSE TestAccWAFV2RuleGroup_RuleAction_customResponse
=== RUN   TestAccWAFV2RuleGroup_sizeConstraintStatement
=== PAUSE TestAccWAFV2RuleGroup_sizeConstraintStatement
=== RUN   TestAccWAFV2RuleGroup_sqliMatchStatement
=== PAUSE TestAccWAFV2RuleGroup_sqliMatchStatement
=== RUN   TestAccWAFV2RuleGroup_tags
=== PAUSE TestAccWAFV2RuleGroup_tags
=== RUN   TestAccWAFV2RuleGroup_xssMatchStatement
=== PAUSE TestAccWAFV2RuleGroup_xssMatchStatement
=== RUN   TestAccWAFV2RuleGroup_rateBasedStatement
=== PAUSE TestAccWAFV2RuleGroup_rateBasedStatement
=== RUN   TestAccWAFV2RuleGroup_RateBased_maxNested
=== PAUSE TestAccWAFV2RuleGroup_RateBased_maxNested
=== RUN   TestAccWAFV2RuleGroup_Operators_maxNested
=== PAUSE TestAccWAFV2RuleGroup_Operators_maxNested
=== RUN   TestAccWAFV2WebACLAssociation_basic
=== PAUSE TestAccWAFV2WebACLAssociation_basic
=== RUN   TestAccWAFV2WebACLAssociation_disappears
=== PAUSE TestAccWAFV2WebACLAssociation_disappears
=== RUN   TestAccWAFV2WebACLDataSource_basic
=== PAUSE TestAccWAFV2WebACLDataSource_basic
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_basic
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_basic
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_updateSingleHeaderRedactedField
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_updateSingleHeaderRedactedField
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_updateMethodRedactedField
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_updateMethodRedactedField
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_updateQueryStringRedactedField
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_updateQueryStringRedactedField
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_updateURIPathRedactedField
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_updateURIPathRedactedField
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_updateMultipleRedactedFields
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_updateMultipleRedactedFields
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_changeResourceARNForceNew
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_changeResourceARNForceNew
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_changeLogDestinationsForceNew
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_changeLogDestinationsForceNew
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_disappears
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_disappears
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_emptyRedactedFields
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_emptyRedactedFields
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_Disappears_webACL
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_Disappears_webACL
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_loggingFilter
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_loggingFilter
=== RUN   TestAccWAFV2WebACL_basic
=== PAUSE TestAccWAFV2WebACL_basic
=== RUN   TestAccWAFV2WebACL_nameGenerated
=== PAUSE TestAccWAFV2WebACL_nameGenerated
=== RUN   TestAccWAFV2WebACL_namePrefix
=== PAUSE TestAccWAFV2WebACL_namePrefix
=== RUN   TestAccWAFV2WebACL_Update_rule
=== PAUSE TestAccWAFV2WebACL_Update_rule
=== RUN   TestAccWAFV2WebACL_Update_ruleProperties
=== PAUSE TestAccWAFV2WebACL_Update_ruleProperties
=== RUN   TestAccWAFV2WebACL_Update_nameForceNew
=== PAUSE TestAccWAFV2WebACL_Update_nameForceNew
=== RUN   TestAccWAFV2WebACL_disappears
=== PAUSE TestAccWAFV2WebACL_disappears
=== RUN   TestAccWAFV2WebACL_ManagedRuleGroup_basic
=== PAUSE TestAccWAFV2WebACL_ManagedRuleGroup_basic
=== RUN   TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig
=== PAUSE TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig
=== RUN   TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ACFPRuleSet
=== PAUSE TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ACFPRuleSet
=== RUN   TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ATPRuleSet
=== PAUSE TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ATPRuleSet
=== RUN   TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_BotControl
=== PAUSE TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_BotControl
=== RUN   TestAccWAFV2WebACL_ManagedRuleGroup_specifyVersion
=== PAUSE TestAccWAFV2WebACL_ManagedRuleGroup_specifyVersion
=== RUN   TestAccWAFV2WebACL_minimal
=== PAUSE TestAccWAFV2WebACL_minimal
=== RUN   TestAccWAFV2WebACL_RateBased_basic
=== PAUSE TestAccWAFV2WebACL_RateBased_basic
=== RUN   TestAccWAFV2WebACL_ByteMatchStatement_basic
=== PAUSE TestAccWAFV2WebACL_ByteMatchStatement_basic
=== RUN   TestAccWAFV2WebACL_ByteMatchStatement_ja3fingerprint
=== PAUSE TestAccWAFV2WebACL_ByteMatchStatement_ja3fingerprint
=== RUN   TestAccWAFV2WebACL_ByteMatchStatement_jsonBody
=== PAUSE TestAccWAFV2WebACL_ByteMatchStatement_jsonBody
=== RUN   TestAccWAFV2WebACL_ByteMatchStatement_body
=== PAUSE TestAccWAFV2WebACL_ByteMatchStatement_body
=== RUN   TestAccWAFV2WebACL_ByteMatchStatement_headerOrder
=== PAUSE TestAccWAFV2WebACL_ByteMatchStatement_headerOrder
=== RUN   TestAccWAFV2WebACL_GeoMatch_basic
=== PAUSE TestAccWAFV2WebACL_GeoMatch_basic
=== RUN   TestAccWAFV2WebACL_GeoMatch_forwardedIP
=== PAUSE TestAccWAFV2WebACL_GeoMatch_forwardedIP
=== RUN   TestAccWAFV2WebACL_LabelMatchStatement
=== PAUSE TestAccWAFV2WebACL_LabelMatchStatement
=== RUN   TestAccWAFV2WebACL_RuleLabels
=== PAUSE TestAccWAFV2WebACL_RuleLabels
=== RUN   TestAccWAFV2WebACL_IPSetReference_basic
=== PAUSE TestAccWAFV2WebACL_IPSetReference_basic
=== RUN   TestAccWAFV2WebACL_IPSetReference_forwardedIP
=== PAUSE TestAccWAFV2WebACL_IPSetReference_forwardedIP
=== RUN   TestAccWAFV2WebACL_RateBased_customKeys
=== PAUSE TestAccWAFV2WebACL_RateBased_customKeys
=== RUN   TestAccWAFV2WebACL_RateBased_forwardedIP
=== PAUSE TestAccWAFV2WebACL_RateBased_forwardedIP
=== RUN   TestAccWAFV2WebACL_RuleGroupReference_basic
=== PAUSE TestAccWAFV2WebACL_RuleGroupReference_basic
=== RUN   TestAccWAFV2WebACL_RuleGroupReference_shieldMitigation
=== PAUSE TestAccWAFV2WebACL_RuleGroupReference_shieldMitigation
=== RUN   TestAccWAFV2WebACL_RuleGroupReference_manageShieldMitigationRule
=== PAUSE TestAccWAFV2WebACL_RuleGroupReference_manageShieldMitigationRule
=== RUN   TestAccWAFV2WebACL_Custom_requestHandling
=== PAUSE TestAccWAFV2WebACL_Custom_requestHandling
=== RUN   TestAccWAFV2WebACL_Custom_response
=== PAUSE TestAccWAFV2WebACL_Custom_response
=== RUN   TestAccWAFV2WebACL_tags
=== PAUSE TestAccWAFV2WebACL_tags
=== RUN   TestAccWAFV2WebACL_RateBased_maxNested
=== PAUSE TestAccWAFV2WebACL_RateBased_maxNested
=== RUN   TestAccWAFV2WebACL_Operators_maxNested
=== PAUSE TestAccWAFV2WebACL_Operators_maxNested
=== RUN   TestAccWAFV2WebACL_tokenDomains
=== PAUSE TestAccWAFV2WebACL_tokenDomains
=== RUN   TestAccWAFV2WebACL_associationConfigCloudFront
=== PAUSE TestAccWAFV2WebACL_associationConfigCloudFront
=== RUN   TestAccWAFV2WebACL_associationConfigRegional
=== PAUSE TestAccWAFV2WebACL_associationConfigRegional
=== RUN   TestAccWAFV2WebACL_CloudFrontScope
=== PAUSE TestAccWAFV2WebACL_CloudFrontScope
=== RUN   TestAccWAFV2WebACL_ruleJSON
=== PAUSE TestAccWAFV2WebACL_ruleJSON
=== RUN   TestAccWAFV2WebACL_ruleJSONToRule
=== PAUSE TestAccWAFV2WebACL_ruleJSONToRule
=== CONT  TestAccWAFV2IPSetDataSource_basic
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_updateSingleHeaderRedactedField
=== CONT  TestAccWAFV2RuleGroup_changeCapacityForceNew
=== CONT  TestAccWAFV2WebACL_ByteMatchStatement_basic
=== CONT  TestAccWAFV2WebACL_RuleGroupReference_shieldMitigation
=== CONT  TestAccWAFV2RuleGroup_RuleAction_customRequestHandling
=== CONT  TestAccWAFV2RegexPatternSet_namePrefix
=== CONT  TestAccWAFV2WebACL_LabelMatchStatement
=== CONT  TestAccWAFV2WebACL_RateBased_customKeys
=== CONT  TestAccWAFV2RuleGroup_RateBased_maxNested
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_basic
=== CONT  TestAccWAFV2WebACLDataSource_basic
=== CONT  TestAccWAFV2WebACLAssociation_disappears
=== CONT  TestAccWAFV2WebACLAssociation_basic
=== CONT  TestAccWAFV2RuleGroup_Operators_maxNested
=== CONT  TestAccWAFV2WebACL_namePrefix
=== CONT  TestAccWAFV2WebACL_RateBased_basic
=== CONT  TestAccWAFV2WebACL_minimal
=== CONT  TestAccWAFV2WebACL_ManagedRuleGroup_specifyVersion
=== CONT  TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_BotControl
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_BotControl (80.97s)
=== CONT  TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ATPRuleSet
--- PASS: TestAccWAFV2IPSetDataSource_basic (82.09s)
=== CONT  TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ACFPRuleSet
--- PASS: TestAccWAFV2RegexPatternSet_namePrefix (84.32s)
=== CONT  TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig
--- PASS: TestAccWAFV2RuleGroup_RateBased_maxNested (95.75s)
=== CONT  TestAccWAFV2WebACL_ManagedRuleGroup_basic
--- PASS: TestAccWAFV2RuleGroup_Operators_maxNested (100.66s)
=== CONT  TestAccWAFV2WebACL_disappears
--- PASS: TestAccWAFV2WebACL_minimal (101.64s)
=== CONT  TestAccWAFV2WebACL_Update_nameForceNew
--- PASS: TestAccWAFV2WebACLDataSource_basic (110.00s)
=== CONT  TestAccWAFV2WebACL_Update_ruleProperties
--- PASS: TestAccWAFV2WebACL_namePrefix (116.65s)
=== CONT  TestAccWAFV2WebACL_Update_rule
--- PASS: TestAccWAFV2WebACLAssociation_basic (130.46s)
=== CONT  TestAccWAFV2WebACL_RuleGroupReference_basic
--- PASS: TestAccWAFV2RuleGroup_changeCapacityForceNew (139.56s)
=== CONT  TestAccWAFV2RuleGroup_ipSetReferenceStatement
--- PASS: TestAccWAFV2RuleGroup_RuleAction_customRequestHandling (164.80s)
=== CONT  TestAccWAFV2RuleGroup_ruleAction
--- PASS: TestAccWAFV2WebACL_ByteMatchStatement_basic (170.62s)
=== CONT  TestAccWAFV2RuleGroup_regexPatternSetReferenceStatement
--- PASS: TestAccWAFV2WebACL_RateBased_basic (172.38s)
=== CONT  TestAccWAFV2RuleGroup_regexMatchStatement
--- PASS: TestAccWAFV2WebACLAssociation_disappears (173.68s)
=== CONT  TestAccWAFV2RuleGroup_minimal
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_specifyVersion (174.53s)
=== CONT  TestAccWAFV2RuleGroup_logicalRuleStatements
--- PASS: TestAccWAFV2WebACL_LabelMatchStatement (175.05s)
=== CONT  TestAccWAFV2RuleGroup_IPSetReferenceStatement_ipsetForwardedIP
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_basic (183.56s)
=== CONT  TestAccWAFV2RuleGroup_tags
--- PASS: TestAccWAFV2WebACL_disappears (83.49s)
=== CONT  TestAccWAFV2RuleGroup_rateBasedStatement
--- PASS: TestAccWAFV2RuleGroup_ipSetReferenceStatement (99.38s)
=== CONT  TestAccWAFV2RuleGroup_xssMatchStatement
--- PASS: TestAccWAFV2RuleGroup_minimal (79.43s)
=== CONT  TestAccWAFV2RuleGroup_sizeConstraintStatement
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ACFPRuleSet (171.77s)
=== CONT  TestAccWAFV2RuleGroup_sqliMatchStatement
--- PASS: TestAccWAFV2WebACL_Update_nameForceNew (152.91s)
=== CONT  TestAccWAFV2RuleGroup_geoMatchStatement
--- PASS: TestAccWAFV2WebACL_RuleGroupReference_shieldMitigation (254.71s)
=== CONT  TestAccWAFV2RuleGroup_LabelMatchStatement
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig (171.67s)
=== CONT  TestAccWAFV2RuleGroup_GeoMatchStatement_forwardedIP
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig_ATPRuleSet (178.78s)
=== CONT  TestAccWAFV2WebACL_ByteMatchStatement_headerOrder
--- PASS: TestAccWAFV2RuleGroup_regexMatchStatement (99.92s)
=== CONT  TestAccWAFV2WebACL_GeoMatch_forwardedIP
=== CONT  TestAccWAFV2WebACL_GeoMatch_basic
--- PASS: TestAccWAFV2RuleGroup_regexPatternSetReferenceStatement (108.26s)
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_updateSingleHeaderRedactedField (289.90s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_disappears
--- PASS: TestAccWAFV2WebACL_Update_rule (174.41s)
=== CONT  TestAccWAFV2WebACL_nameGenerated
--- PASS: TestAccWAFV2WebACL_RuleGroupReference_basic (213.68s)
=== CONT  TestAccWAFV2WebACL_basic
--- PASS: TestAccWAFV2WebACL_Update_ruleProperties (256.06s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_loggingFilter
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_basic (285.49s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_Disappears_webACL
--- PASS: TestAccWAFV2RuleGroup_ruleAction (218.76s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields
--- PASS: TestAccWAFV2WebACL_nameGenerated (101.18s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_emptyRedactedFields
--- PASS: TestAccWAFV2RuleGroup_xssMatchStatement (162.14s)
=== CONT  TestAccWAFV2WebACL_RateBased_forwardedIP
--- PASS: TestAccWAFV2RuleGroup_tags (218.54s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_updateMultipleRedactedFields
--- PASS: TestAccWAFV2RuleGroup_logicalRuleStatements (233.63s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_changeLogDestinationsForceNew
--- PASS: TestAccWAFV2RuleGroup_sizeConstraintStatement (158.08s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_changeResourceARNForceNew
--- PASS: TestAccWAFV2RuleGroup_sqliMatchStatement (161.19s)
=== CONT  TestAccWAFV2WebACL_ByteMatchStatement_jsonBody
--- PASS: TestAccWAFV2RuleGroup_geoMatchStatement (161.60s)
=== CONT  TestAccWAFV2WebACL_ByteMatchStatement_body
--- PASS: TestAccWAFV2RuleGroup_GeoMatchStatement_forwardedIP (161.51s)
=== CONT  TestAccWAFV2RuleGroup_RuleAction_customResponse
--- PASS: TestAccWAFV2RuleGroup_LabelMatchStatement (164.26s)
=== CONT  TestAccWAFV2WebACL_IPSetReference_basic
--- PASS: TestAccWAFV2WebACL_ByteMatchStatement_headerOrder (162.37s)
=== CONT  TestAccWAFV2WebACL_IPSetReference_forwardedIP
--- PASS: TestAccWAFV2WebACL_GeoMatch_forwardedIP (160.08s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_updateQueryStringRedactedField
--- PASS: TestAccWAFV2WebACL_basic (89.52s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_updateURIPathRedactedField
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_disappears (145.31s)
=== CONT  TestAccWAFV2WebACL_RuleLabels
--- PASS: TestAccWAFV2WebACL_GeoMatch_basic (157.03s)
=== CONT  TestAccWAFV2RuleGroup_nameGenerated
--- PASS: TestAccWAFV2RuleGroup_IPSetReferenceStatement_ipsetForwardedIP (275.00s)
=== CONT  TestAccWAFV2RuleGroup_changeNameForceNew
=== NAME  TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields
    web_acl_logging_configuration_test.go:461: Step 2/3 error: Error running apply: exit status 1
        
        Error: putting WAFv2 WebACL Logging Configuration (arn:aws:wafv2:us-west-2:153020297428:regional/webacl/tf-acc-test-4222294758612592102/0abbdabe-9f70-467c-b048-100c72ee9bd6): operation error WAFV2: PutLoggingConfiguration, https response error StatusCode: 400, RequestID: 30b0ca0a-42fd-402a-b0d1-ef52d970978e, WAFServiceLinkedRoleErrorException: AWS WAF couldn’t obtain a service-linked role (SLR) lock for your operation because the lock was in use. Retry your operation.
        
          with aws_wafv2_web_acl_logging_configuration.test,
          on terraform_plugin_test.tf line 113, in resource "aws_wafv2_web_acl_logging_configuration" "test":
         113: resource "aws_wafv2_web_acl_logging_configuration" "test" {
        
--- PASS: TestAccWAFV2WebACL_IPSetReference_basic (68.52s)
=== CONT  TestAccWAFV2RuleGroup_ByteMatchStatement_fieldToMatch
--- PASS: TestAccWAFV2RuleGroup_nameGenerated (64.83s)
=== CONT  TestAccWAFV2RuleGroup_byteMatchStatement
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_Disappears_webACL (128.69s)
=== CONT  TestAccWAFV2RuleGroup_updateRuleProperties
--- PASS: TestAccWAFV2WebACL_RateBased_forwardedIP (109.76s)
=== CONT  TestAccWAFV2RuleGroup_updateRule
--- PASS: TestAccWAFV2WebACL_ByteMatchStatement_jsonBody (108.18s)
=== CONT  TestAccWAFV2RuleGroup_namePrefix
--- PASS: TestAccWAFV2WebACL_ByteMatchStatement_body (111.83s)
=== CONT  TestAccWAFV2IPSet_changeNameForceNew
--- FAIL: TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields (149.63s)
=== CONT  TestAccWAFV2RegexPatternSet_nameGenerated
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_emptyRedactedFields (152.91s)
=== CONT  TestAccWAFV2RegexPatternSet_basic
--- PASS: TestAccWAFV2RuleGroup_changeNameForceNew (95.60s)
=== CONT  TestAccWAFV2RegexPatternSetDataSource_basic
--- PASS: TestAccWAFV2WebACL_RuleLabels (113.56s)
=== CONT  TestAccWAFV2IPSet_large
--- PASS: TestAccWAFV2RuleGroup_RuleAction_customResponse (147.01s)
=== CONT  TestAccWAFV2IPSet_tags
--- PASS: TestAccWAFV2WebACL_RateBased_customKeys (564.97s)
=== CONT  TestAccWAFV2IPSet_addresses
--- PASS: TestAccWAFV2RegexPatternSet_nameGenerated (57.01s)
=== CONT  TestAccWAFV2WebACL_ByteMatchStatement_ja3fingerprint
--- PASS: TestAccWAFV2RuleGroup_namePrefix (67.19s)
=== CONT  TestAccWAFV2RegexPatternSet_tags
--- PASS: TestAccWAFV2RegexPatternSetDataSource_basic (53.48s)
=== CONT  TestAccWAFV2RuleGroup_basic
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_updateQueryStringRedactedField (173.52s)
=== CONT  TestAccWAFV2RuleGroupDataSource_basic
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_updateURIPathRedactedField (172.66s)
=== CONT  TestAccWAFV2RegexPatternSet_minimal
--- PASS: TestAccWAFV2IPSet_large (60.04s)
=== CONT  TestAccWAFV2RegexPatternSet_changeNameForceNew
--- PASS: TestAccWAFV2IPSet_changeNameForceNew (80.95s)
=== CONT  TestAccWAFV2IPSet_disappears
--- PASS: TestAccWAFV2RuleGroup_byteMatchStatement (111.89s)
=== CONT  TestAccWAFV2IPSet_minimal
--- PASS: TestAccWAFV2IPSet_addresses (53.08s)
=== CONT  TestAccWAFV2IPSet_ipv6
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_updateMultipleRedactedFields (219.19s)
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_updateMethodRedactedField
--- PASS: TestAccWAFV2RuleGroup_updateRule (112.91s)
=== CONT  TestAccWAFV2RuleGroup_disappears
--- PASS: TestAccWAFV2WebACL_IPSetReference_forwardedIP (206.73s)
=== CONT  TestAccWAFV2RuleGroup_RuleLabels
--- PASS: TestAccWAFV2RegexPatternSet_basic (93.67s)
=== CONT  TestAccWAFV2WebACL_tokenDomains
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_changeLogDestinationsForceNew (242.88s)
=== CONT  TestAccWAFV2WebACL_ruleJSONToRule
--- PASS: TestAccWAFV2RegexPatternSet_minimal (49.26s)
=== CONT  TestAccWAFV2WebACL_ruleJSON
--- PASS: TestAccWAFV2IPSet_disappears (51.56s)
=== CONT  TestAccWAFV2WebACL_CloudFrontScope
    web_acl_test.go:3063: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-1]
--- SKIP: TestAccWAFV2WebACL_CloudFrontScope (0.00s)
=== CONT  TestAccWAFV2WebACL_associationConfigRegional
--- PASS: TestAccWAFV2RuleGroup_updateRuleProperties (158.80s)
=== CONT  TestAccWAFV2WebACL_associationConfigCloudFront
    web_acl_test.go:2966: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-1]
--- SKIP: TestAccWAFV2WebACL_associationConfigCloudFront (0.00s)
=== CONT  TestAccWAFV2WebACL_tags
--- PASS: TestAccWAFV2RuleGroup_basic (70.49s)
=== CONT  TestAccWAFV2WebACL_Operators_maxNested
--- PASS: TestAccWAFV2RuleGroupDataSource_basic (65.51s)
=== CONT  TestAccWAFV2WebACL_RateBased_maxNested
=== CONT  TestAccWAFV2RegexPatternSet_disappears
--- PASS: TestAccWAFV2IPSet_minimal (60.86s)
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_loggingFilter (308.14s)
=== CONT  TestAccWAFV2WebACL_Custom_requestHandling
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_changeResourceARNForceNew (263.61s)
=== CONT  TestAccWAFV2WebACL_Custom_response
--- PASS: TestAccWAFV2IPSet_ipv6 (58.39s)
=== CONT  TestAccWAFV2IPSet_nameGenerated
--- PASS: TestAccWAFV2RuleGroup_disappears (58.60s)
=== CONT  TestAccWAFV2IPSet_namePrefix
--- PASS: TestAccWAFV2IPSet_tags (125.23s)
=== CONT  TestAccWAFV2IPSet_basic
--- PASS: TestAccWAFV2RegexPatternSet_changeNameForceNew (83.27s)
=== CONT  TestAccWAFV2RuleGroup_changeMetricNameForceNew
--- PASS: TestAccWAFV2WebACL_tokenDomains (76.96s)
=== CONT  TestAccWAFV2WebACL_RuleGroupReference_manageShieldMitigationRule
--- PASS: TestAccWAFV2WebACL_ByteMatchStatement_ja3fingerprint (125.63s)
--- PASS: TestAccWAFV2RegexPatternSet_tags (138.40s)
--- PASS: TestAccWAFV2RegexPatternSet_disappears (58.06s)
--- PASS: TestAccWAFV2WebACL_associationConfigRegional (79.32s)
--- PASS: TestAccWAFV2IPSet_nameGenerated (66.46s)
--- PASS: TestAccWAFV2RuleGroup_RuleLabels (116.17s)
--- PASS: TestAccWAFV2IPSet_namePrefix (65.17s)
--- PASS: TestAccWAFV2WebACL_RateBased_maxNested (80.66s)
--- PASS: TestAccWAFV2WebACL_Operators_maxNested (85.52s)
--- PASS: TestAccWAFV2WebACL_ruleJSONToRule (106.22s)
--- PASS: TestAccWAFV2WebACL_ruleJSON (110.46s)
--- PASS: TestAccWAFV2IPSet_basic (85.17s)
--- PASS: TestAccWAFV2RuleGroup_changeMetricNameForceNew (83.64s)
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_updateMethodRedactedField (173.77s)
--- PASS: TestAccWAFV2RuleGroup_rateBasedStatement (613.23s)
--- PASS: TestAccWAFV2WebACL_tags (130.79s)
--- PASS: TestAccWAFV2WebACL_Custom_response (130.13s)
--- PASS: TestAccWAFV2WebACL_RuleGroupReference_manageShieldMitigationRule (109.52s)
--- PASS: TestAccWAFV2WebACL_Custom_requestHandling (155.72s)
--- PASS: TestAccWAFV2RuleGroup_ByteMatchStatement_fieldToMatch (450.02s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/wafv2	947.297s
FAIL
make: *** [testacc] Error 1

One test failed but it appeared to be unrelated to my changes. I reran that specific test and it passed:

$ make testacc TESTARGS='-run=TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields' PKG=wafv2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/wafv2/... -v -count 1 -parallel 20  -run=TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields -timeout 360m
2025/01/13 09:47:19 Initializing Terraform AWS Provider...
=== RUN   TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields
=== PAUSE TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields
=== CONT  TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields
--- PASS: TestAccWAFV2WebACLLoggingConfiguration_updateEmptyRedactedFields (156.44s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/wafv2	165.900s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/wafv2 Issues and PRs that pertain to the wafv2 service. needs-triage Waiting for first response or review from a maintainer. labels Jan 13, 2025
@rbreslow rbreslow force-pushed the f-name_prefix-for-wafv2-resources branch from 9164266 to be7aa89 Compare January 13, 2025 08:27
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @rbreslow 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@rbreslow rbreslow marked this pull request as ready for review January 13, 2025 08:50
@rbreslow rbreslow requested a review from a team as a code owner January 13, 2025 08:50
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/wafv2 Issues and PRs that pertain to the wafv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants