Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cloudfront): prevent WebACL from being created in regions other…
… than us-east-1 (#32252) ### Reason for this change When attaching a WebACL to CloudFront Distribution, the region must be `us-east-1`, but no validation was done. see: https://docs.aws.amazon.com/waf/latest/developerguide/web-acl-creating.html > For Region, if you've chosen a Regional resource type, choose the Region where you want AWS WAF to store the web ACL. > > You only need to choose this option for Regional resource types. For CloudFront distributions, the Region is hard-coded to the US East (N. Virginia) Region, us-east-1, for Global (CloudFront) applications. ### Description of changes Add validation to the `attachWebAclId` method of CloudFront Distribution ### Description of how you validated changes Unit and integ testing ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information