github.com/ves/terraform@v0.8.0-beta2/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 ip_set_descriptors { 19 type = "IPV4" 20 value = "192.0.7.0/24" 21 } 22 } 23 24 resource "aws_waf_rule" "wafrule" { 25 depends_on = ["aws_waf_ipset.ipset"] 26 name = "tfWAFRule" 27 metric_name = "tfWAFRule" 28 predicates { 29 data_id = "${aws_waf_ipset.ipset.id}" 30 negated = false 31 type = "IPMatch" 32 } 33 } 34 ``` 35 36 ## Argument Reference 37 38 The following arguments are supported: 39 40 * `metric_name` - (Required) The name or description for the Amazon CloudWatch metric of this rule. 41 * `name` - (Required) The name or description of the rule. 42 * `predicates` - (Optional) The ByteMatchSet, IPSet, SizeConstraintSet, SqlInjectionMatchSet, or XssMatchSet objects to include in a rule. 43 44 ## Remarks 45 46 ## Attributes Reference 47 48 The following attributes are exported: 49 50 * `id` - The ID of the WAF rule.