github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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 ## 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 ``` 31 32 ## Argument Reference 33 34 The following arguments are supported: 35 36 * `metric_name` - (Required) The name or description for the Amazon CloudWatch metric of this rule. 37 * `name` - (Required) The name or description of the rule. 38 * `predicates` - (Optional) The ByteMatchSet, IPSet, SizeConstraintSet, SqlInjectionMatchSet, or XssMatchSet objects to include in a rule. 39 40 ## Remarks 41 42 ## Attributes Reference 43 44 The following attributes are exported: 45 46 * `id` - The ID of the WAF rule.