github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/website/source/docs/providers/aws/r/waf_web_acl.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_waf_web_acl"
     4  sidebar_current: "docs-aws-resource-waf"
     5  description: |-
     6    Provides a AWS WAF web access control group (ACL) resource.
     7  ---
     8  
     9  ## Example Usage
    10  
    11  ```
    12  resource "aws_waf_ipset" "ipset" {
    13    name = "tfIPSet"
    14    ip_set_descriptors {
    15      type = "IPV4"
    16      value = "192.0.7.0/24"
    17    }
    18  }
    19  
    20  resource "aws_waf_rule" "wafrule" {
    21    depends_on = ["aws_waf_ipset.ipset"]
    22    name = "tfWAFRule"
    23    metric_name = "tfWAFRule"
    24    predicates {
    25      data_id = "${aws_waf_ipset.ipset.id}"
    26      negated = false
    27      type = "IPMatch"
    28    }
    29  }
    30  resource "aws_waf_web_acl" "waf_acl" {
    31    depends_on = ["aws_waf_ipset.ipset", "aws_waf_rule.wafrule"]
    32    name = "tfWebACL"
    33    metric_name = "tfWebACL"
    34    default_action {
    35      type = "ALLOW"
    36    }
    37    rules {
    38      action {
    39         type = "BLOCK"
    40      }
    41      priority = 1 
    42      rule_id = "${aws_waf_rule.wafrule.id}"
    43    }
    44  }
    45  ```
    46  
    47  ## Argument Reference
    48  
    49  The following arguments are supported:
    50  
    51  * `default_action` - (Required) The action that you want AWS WAF to take when a request doesn't match the criteria in any of the rules that are associated with the web ACL.
    52  * `metric_name` - (Required) The name or description for the Amazon CloudWatch metric of this web ACL.
    53  * `name` - (Required) The name or description of the web ACL.
    54  * `rules` - (Required) The rules to associate with the web ACL and the settings for each rule.
    55  
    56  
    57  ## Remarks
    58  
    59  ## Attributes Reference
    60  
    61  The following attributes are exported:
    62  
    63  * `id` - The ID of the WAF WebACL.