WAFv2 scope=cloudfront

Hi,
I’m pretty new to Terraform and I’ve been trying to build a WAFv2 web acl with little success.
I’ve got regional working ok but when I change scope=regional to cloudfront I get the following error:

Error: Error creating WAFv2 WebACL: WAFInvalidParameterException: Error reason: The scope is not valid., field: SCOPE_VALUE, parameter: CLOUDFRONT
{
RespMetadata: {
StatusCode: 400,
RequestID: “37cec571-6aa1-4ae5-916d-e5103e6de9b2”
},
Field: “SCOPE_VALUE”,
Message_: “Error reason: The scope is not valid., field: SCOPE_VALUE, parameter: CLOUDFRONT”,
Parameter: “CLOUDFRONT”,
Reason: “The scope is not valid.”

I’ve specified the region in my provider.tf and I can’t add the line under scope as that errors.
I’m running the latest Terraform and AWS provider.

Could anyone help me with this please as I’ve been trying for a few days with no joy?

Thanks

Hi @cyclops69 :

For CLOUDFRONT , you must create your WAFv2 resources in the US East (N. Virginia) Region, us-east-1 .