Resource: awsWafregionalRule
Provides an WAF Regional Rule Resource for use with Application Load Balancer.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsWafregionalIpsetIpset = new aws.wafregionalIpset.WafregionalIpset(
this,
"ipset",
{
ipSetDescriptor: [
{
type: "IPV4",
value: "192.0.7.0/24",
},
],
name: "tfIPSet",
}
);
new aws.wafregionalRule.WafregionalRule(this, "wafrule", {
metricName: "tfWAFRule",
name: "tfWAFRule",
predicate: [
{
dataId: awsWafregionalIpsetIpset.id,
negated: false,
type: "IPMatch",
},
],
});
Argument Reference
The following arguments are supported:
name
- (Required) The name or description of the rule.metricName
- (Required) The name or description for the Amazon CloudWatch metric of this rule.predicate
- (Optional) The objects to include in a rule (documented below).tags
- (Optional) Key-value map of resource tags. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Nested Fields
predicate
See the WAF Documentation for more information.
Arguments
type
- (Required) The type of predicate in a rule. Valid values:byteMatch
,geoMatch
,ipMatch
,regexMatch
,sizeConstraint
,sqlInjectionMatch
, orxssMatch
dataId
- (Required) The unique identifier of a predicate, such as the ID of abyteMatchSet
oripSet
.negated
- (Required) Whether to use the settings or the negated settings that you specified in the objects.
Remarks
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of the WAF Regional Rule.arn
- The ARN of the WAF Regional Rule.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
WAF Regional Rule can be imported using the id, e.g.,