aws-solutions / aws-waf-security-automations

This solution automatically deploys a single web access control list (web ACL) with a set of AWS WAF rules designed to filter common web-based attacks.
https://aws.amazon.com/solutions/aws-waf-security-automations
Apache License 2.0
837 stars 359 forks source link

Add a cloudformation export so the WebACL can be referenced in other stacks #216

Closed matthewhembree closed 1 year ago

matthewhembree commented 2 years ago

Is your feature request related to a problem? Please describe. I'd like to be able to add the WebACL association through automation.

Describe the feature you'd like Create a cloudformation export of the WebACL ARN that can be used in other stacks (and Terraform through data.aws_cloudformation_export.my-webacl).

e.g.:

Type: AWS::WAFv2::WebACLAssociation
Properties: 
  ResourceArn: !Ref MyApiGateway.Arn
  WebACLArn: Fn::ImportValue:
    !Sub "${WAFStackName}-WebAclArn"

Additional context Adding the example resource to my SAM deployments would ensure guaranteed attachment to all deployments (even feature/preview deployments).

matthewhembree commented 2 years ago

Fixed in #121

aijunpeng commented 1 year ago

This issue has been addressed in version >=4.0.0.