0.12.26 and latest terraform aws provider (aws = "~> 2.67")
resource "aws_wafv2_web_acl" "main" {
name = "name"
scope = "REGIONAL"
tags = {
"env" = "test"
}
}
I am make use of this resource my module here -> https://github.com/umotif-public/terraform-aws-waf-webaclv2/blob/master/main.tf#L49
May be easier to reproduce that issue directly with the module.
I expect to update tags in place without failing.
Getting following error when a modification to tags happens.
Error: Error updating WAFv2 WebACL: WAFInvalidParameterException: Error reason: Your statement has multiple values set for a field that requires exactly one value., field: STATEMENT, parameter: Statement
{
RespMetadata: {
StatusCode: 400,
RequestID: "107414ca-164c-4797-aa41-0472d1079d86"
},
Field: "STATEMENT",
Message_: "Error reason: Your statement has multiple values set for a field that requires exactly one value., field: STATEMENT, parameter: Statement",
Parameter: "Statement",
Reason: "Your statement has multiple values set for a field that requires exactly one value."
}
Simply add another tag to tags map and terraform apply
Submitted an update to the resource that should prevent the extra UpdateWebACL API call: https://github.com/terraform-providers/terraform-provider-aws/pull/13871
The above fix has been merged and will release with version 2.68.0 of the Terraform AWS Provider, later this week. Please note that there may still be underlying issues with actual updates with what we pass to the UpdateWebACL API call when it is needed and if so, please file a separate issue. Thanks!
This has been released in version 2.68.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!
Most helpful comment
The above fix has been merged and will release with version 2.68.0 of the Terraform AWS Provider, later this week. Please note that there may still be underlying issues with actual updates with what we pass to the
UpdateWebACLAPI call when it is needed and if so, please file a separate issue. Thanks!