Terraform-provider-aws: Wafv2 resource aws_wafv2_web_acl failing to update tags

Created on 22 Jun 2020  ·  4Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

0.12.26 and latest terraform aws provider (aws = "~> 2.67")

Affected Resource(s)

  • aws_wafv2_web_acl

Terraform Configuration Files

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.

Expected Behavior

I expect to update tags in place without failing.

Actual Behavior

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."
}

Steps to Reproduce

Simply add another tag to tags map and terraform apply

bug servicwafv2

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 UpdateWebACL API call when it is needed and if so, please file a separate issue. Thanks!

All 4 comments

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!

Was this page helpful?
0 / 5 - 0 ratings