Create CLOUDFRONT scoped AWS::WAFv2::WebACL with CloudFormation

0

Hi!

I'm having difficulties creating a AWS::WAFv2::WebACL resource with CloudFormation:

The documentation (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-scope) states For CLOUDFRONT, you must create your WAFv2 resources in the US East (N. Virginia) Region, us-east-1.

The only WebACL resource I am trying to spawn basically looks like this:

  ExampleWebACL:
    Type: AWS::WAFv2::WebACL
    Properties:
      Name: example-name
      Description: example-description
      Scope: CLOUDFRONT
      DefaultAction:
        Allow: {}
      VisibilityConfig:
        SampledRequestsEnabled: true
        CloudWatchMetricsEnabled: true
        MetricName: example-metric

Creation fails for Scope: CLOUDFRONT with 400 / Error reason: The scope is not valid.

Where do I set the region to us-east-1?

Thanks Christoph

chris
已提問 2 年前檢視次數 1747 次
1 個回答
0

Thank you aabragan for hinting at what the solution is: --region us-east-1 does the trick.

I guess

  • the first statement is, that CloudFormation stacks are region bound
  • and the answer to the question how do I create resources in multiple regions may be StackSets.
chris
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南