alicloud_esa_waf_ruleset

更新时间:

Provides a ESA Waf Ruleset resource.

waf rule set.

For information about ESA Waf Ruleset and how to use it, see What is Waf Ruleset.

-> NOTE: Available since v1.260.0.

Example Usage

Basic Usage


variable "name" {
  default = "tf-example"
}

data "alicloud_esa_sites" "default" {
  plan_subscribe_type = "enterpriseplan"
}

resource "alicloud_esa_waf_ruleset" "default" {
  site_id      = data.alicloud_esa_sites.default.sites.0.site_id
  phase        = "http_custom"
  site_version = "0"
  name         = var.name
}

Argument Reference

The following arguments are supported:

  • name - (Optional, ForceNew) The ruleset name.
  • phase - (Required, ForceNew) The WAF phase
  • site_id - (Required, ForceNew, Int) The website ID, which can be obtained by calling the ListSites operation.
  • site_version - (Optional, Int) The site version.
  • status - (Optional, Computed) Rule Set Status

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.The value is formulated as <ruleset_id>:<site_id>.
  • ruleset_id - waf rule set id

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 5 mins) Used when create the Waf Ruleset.
  • delete - (Defaults to 5 mins) Used when delete the Waf Ruleset.
  • update - (Defaults to 5 mins) Used when update the Waf Ruleset.

Import

ESA Waf Ruleset can be imported using the id, e.g.

$ terraform import alicloud_esa_waf_ruleset.example <ruleset_id>:<site_id>