0

クラウド形成テンプレートを作成して、地理的位置条件で WAF を構成しようとしています。適切なテンプレートがまだ見つかりません。任意のポインタをいただければ幸いです。

http://docs.aws.amazon.com/waf/latest/developerguide/web-acl-geo-conditions.html

4

3 に答える 3

1

ドキュメントはありませんが、サーバーレス/クラウドフォーメーションでジオ マッチを作成することは可能です。

サーバーレスで以下を使用しました。

Resources:
  Geos:
    Type: "AWS::WAFRegional::GeoMatchSet"
    Properties:
      Name: geo
      GeoMatchConstraints:
      - Type: "Country"
        Value: "IE"

これは、cloudformation で次のように変換されます。

"Geos": {
  "Type": "AWS::WAFRegional::GeoMatchSet",
  "Properties": {
    "Name": "geo",
    "GeoMatchConstraints": [
      {
        "Type": "Country",
        "Value": "IE"
      }
    ]
  }
}

これは、ルールを作成するときに参照できます。

(サーバーレス) :

Resources:
  MyRule:
    Type: "AWS::WAFRegional::Rule"
    Properties:
      Name: waf
      Predicates:
      - DataId:
          Ref: "Geos"
        Negated: false
        Type: "GeoMatch"

(雲の形成) :

"MyRule": {
  "Type": "AWS::WAFRegional::Rule",
  "Properties": {
    "Name": "waf",
    "Predicates": [
      {
        "DataId": {
          "Ref": "Geos"
        },
        "Negated": false,
        "Type": "GeoMatch"
      }
    ]
  }
}
于 2019-05-13T08:58:44.050 に答える