AWS::WAFv2::WebACLAssociation Tag [Bug]
- AWS::WAFv2::WebACLAssociation
If you are using a AWS::WAFv2::WebACLAssociation, and you update the CloudFormation stack and change a tag value on the CloudFormation stack itself, you get an error: WAFv2::WebACLAssociation: "CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename arn:aws:apigateway:us-east-1::/restapis/|arn:aws:wafv2:us-east-1:****:regional/webacl/ and update the stack again."
Steps to reproduce:
- Create a stack with a CloudFormation Stack tag of Key=Foo Value=Bar with a AWS::WAFv2::WebACLAssociation resource
- Update the Stack and only change the CloudFormation Stack Tag value from Bar to NewBar
- You will get the exception below.
This has really hurt us because everything appears to be working fine until you have to go make a change and then it all break. Unfortunately CFT Stack Tags are automatically applied via our CI/CD pipeline to track resources and this has completely derailed our migrations from Waf to WafV2.
We faced the similar situation on our stacks. We update Cloudformation Tags with a new GitShaCommit on every commit. And this causes the same problem even though nothing in the cloudformation stack itself has changed.
For the time being, we have to remove the automatic GitShaCommit tag on Cloudformation.
Looking forward to see this being fixed.
This issue appears to have been fixed as I can no longer replicate the issue (switching to new tag and back in an update). Can you please confirm?
@jerechenamz Yes I can confirm this was fixed earlier this year I believe and is no longer an issue.