hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.16k forks source link

[Enhancement]: cannot delete aws_wafv2_acl tied to aws_cloudfront_distribution #34719

Open sinofseven opened 10 months ago

sinofseven commented 10 months ago

Description

I did the following to remove aws_wafv2_acl tied to aws_cloudfront_distribution.

But when I tried to APPLY, I couldn't delete aws_wafv2_acl because it is tied to aws_cloudfront_distribution.

To work around this, I think it would be better to allow the aws_wafv2_acl_association to be tied to CloudFront.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resources "aws_wafv2_acl_association" "tied_to_cloudfront" {
  resource_arn = aws_cloudfront_distribution.front.arn
  web_acl_arn  = aws_wafv2_acl.waf.arn
}

References

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_web_acl_association#resource_arn

Would you like to implement a fix?

No

github-actions[bot] commented 10 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue