You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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*
0 commit comments