Provides a WAFV3 Defense Template resource.
For information about WAFV3 Defense Template and how to use it, see What is Defense Template.
Basic Usage
variable "name" {
default = "terraform-example"
}
data "alicloud_wafv3_instances" "default" {
}
resource "alicloud_wafv3_defense_template" "default" {
status = "1"
instance_id = data.alicloud_wafv3_instances.default.ids.0
defense_template_name = var.name
template_type = "user_custom"
template_origin = "custom"
defense_scene = "antiscan"
resource_manager_resource_group_id = "example"
description = var.name
}
The following arguments are supported:
defense_scene
- (Required, ForceNew) The module to which the protection rule that you want to create belongs. Value:
defense_template_name
- (Required) The name of the protection rule template.description
- (Optional) The description of the protection rule template. .instance_id
- (Required, ForceNew) The ID of the Web Application Firewall (WAF) instance. .resource_manager_resource_group_id
- (Optional) The ID of the Alibaba Cloud resource group. .status
- (Required) The status of the protection rule template. Valid values:
template_origin
- (Required, ForceNew) The origin of the protection rule template that you want to create. Set the value to custom. The value specifies that the protection rule template is a custom template. .template_type
- (Required, ForceNew) The type of the protection rule template. Valid values:
The following attributes are exported:
id
- The ID of the resource supplied above.The value is formulated as <instance_id>:<defense_template_id>
.defense_template_id
- Template ID.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Defense Template.delete
- (Defaults to 5 mins) Used when delete the Defense Template.update
- (Defaults to 5 mins) Used when update the Defense Template.WAFV3 Defense Template can be imported using the id, e.g.
$ terraform import alicloud_wafv3_defense_template.example <instance_id>:<defense_template_id>