Provides a DCDN Waf Policy resource.
For information about DCDN Waf Policy and how to use it, see What is Waf Policy.
Basic Usage
variable "name" {
default = "tf_example"
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_dcdn_waf_policy" "example" {
defense_scene = "waf_group"
policy_name = "${var.name}_${random_integer.default.result}"
policy_type = "custom"
status = "on"
}
The following arguments are supported:
defense_scene
- (Required, ForceNew) The type of protection policy. Valid values: waf_group
, custom_acl
, whitelist
, ip_blacklist
, region_block
.policy_name
- (Required) The name of the protection policy. The name must be 1 to 64 characters in length, and can contain letters, digits,and underscores (_).policy_type
- (Required, ForceNew) The type of the protection policy. Valid values: default
, custom
.status
- (Required) The status of the resource. Valid values: on
, off
.The following attributes are exported:
id
- The resource ID in terraform of Waf Policy.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 1 mins) Used when creating the Waf Policy.delete
- (Defaults to 1 mins) Used when deleting the Waf Policy.update
- (Defaults to 1 mins) Used when updating the Waf Policy.DCDN Waf Policy can be imported using the id, e.g.
$ terraform import alicloud_dcdn_waf_policy.example <id>