-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/wafv2_web_acl_logging_configuration: update redacted_fields schema definition #14319
Conversation
a81db54
to
d417ff6
Compare
94c078d
to
fb9a9ac
Compare
fb9a9ac
to
c9df29c
Compare
website/docs/r/wafv2_web_acl_logging_configuration.html.markdown
Outdated
Show resolved
Hide resolved
3d7c349
to
c7429ef
Compare
c7429ef
to
f5a2224
Compare
@anGie44 can you please rebase this pull request? |
f5a2224
to
008515f
Compare
// as they are not supported by the WAFv2 API | ||
// in the context of WebACL Logging Configurations | ||
// Reference: https://docs.aws.amazon.com/waf/latest/APIReference/API_LoggingConfiguration.html (RedactedFields) | ||
"all_query_arguments": wafv2EmptySchemaDeprecated(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can skip this deprecation part (since they don't function as is?)
662d162
to
c3fdbfb
Compare
// (e.g. body {}) will result in a nil redacted_fields attribute | ||
Type: schema.TypeList, | ||
Optional: true, | ||
DiffSuppressFunc: suppressRedactedFieldsDiff, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understandably not an ideal side-effect :/ any thoughts on using a different hack to work around the order diffs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀
Waiting on the acceptance tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acceptance tests
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_updateUriPathRedactedField (99.34s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_disappears (116.45s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_emptyRedactedFields (116.61s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_basic (120.68s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_updateMultipleRedactedFields (125.83s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_disappears_WebAcl (129.62s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_updateQueryStringRedactedField (135.83s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_updateEmptyRedactedFields (138.26s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_updateSingleHeaderRedactedField (149.56s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_updateMethodRedactedField (150.68s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_changeLogDestinationConfigsForceNew (182.36s)
--- PASS: TestAccAwsWafv2WebACLLoggingConfiguration_changeResourceARNForceNew (200.66s)
@gdavison, are we awaiting a second review for a PR merge? |
Hi @denis-khalturin-incountry , this one slipped my radar! Waiting on CI checks and then will merge 👍 |
66ab7ff
to
405337c
Compare
Output of acceptance tests (commercial):
gov cloud:
|
This has been released in version 3.33.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #14248
Closes #14244
Notes:
The linked GH-Issues brought to light the following:
redacted_fields
blocks in the context of aLoggingConfiguration
only permits a subset of the fields documented in https://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html and the API will error when an unsupported field (e.g. single_query_argument) is provided --> to account for this behavior, a custom schema is made for this argument instead of using the shared one inwaf_helper.go
; fields that are not supported have been marked asDeprecated
until they can officially be removedonly 1 nested attribute is valid in the
redacted_fields
configuration block ofaws_wafv2_web_acl_logging_configuration
and thefield_to_match
block in thewafv2_web_acl
andwafv2_rule_group
resources --> to account for this, the documentation has been updated to prevent users from setting multiple attributesthe previous
Set
type used forredacted_fields
would be evaluated as an empty object when fields with empty schemas (e.g.body
) were configured --> to address this, the field argument has been changed to typeList
Release note for CHANGELOG:
Output from acceptance testing: