LoginSignup
0
0

【AWS】WAFをterraform importしようとしたらThe scope is not valid(400エラー) が出る

Posted at

事象

terraform import ブロックやterraform importコマンドでCloudFrontに割り当てたAWS WAFをimportしようとすると以下のエラー

Error: reading WAFv2 WebACL : operation error WAFV2: GetWebACL, https response error StatusCode: 400, RequestID: 77e90616-f220-46e7-a5f5-328eafeea190, WAFInvalidParameterException: Error reason: The scope is not valid., field: SCOPE_VALUE, parameter: CLOUDFRONT

結論

CloudFront を対象としたWAFをimportする場合は us-east-1(バージニア北部)を指定する
なのでap-northeast-01などで管理している場合はstateファイルを分割する必要がある

参考

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0