github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/waf_rule.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: waf_rule" 4 sidebar_current: "docs-aws-resource-waf-rule" 5 description: |- 6 Provides a AWS WAF rule resource. 7 --- 8 9 # aws\_waf\_rule 10 11 Provides a WAF Rule Resource 12 13 ## Example Usage 14 15 ``` 16 resource "aws_waf_ipset" "ipset" { 17 name = "tfIPSet" 18 19 ip_set_descriptors { 20 type = "IPV4" 21 value = "192.0.7.0/24" 22 } 23 } 24 25 resource "aws_waf_rule" "wafrule" { 26 depends_on = ["aws_waf_ipset.ipset"] 27 name = "tfWAFRule" 28 metric_name = "tfWAFRule" 29 30 predicates { 31 data_id = "${aws_waf_ipset.ipset.id}" 32 negated = false 33 type = "IPMatch" 34 } 35 } 36 ``` 37 38 ## Argument Reference 39 40 The following arguments are supported: 41 42 * `metric_name` - (Required) The name or description for the Amazon CloudWatch metric of this rule. 43 * `name` - (Required) The name or description of the rule. 44 * `predicates` - (Optional) The ByteMatchSet, IPSet, SizeConstraintSet, SqlInjectionMatchSet, or XssMatchSet objects to include in a rule. 45 46 ## Remarks 47 48 ## Attributes Reference 49 50 The following attributes are exported: 51 52 * `id` - The ID of the WAF rule.