alicloud_waf_certificate

更新时间:

Provides a WAF Certificate resource.

For information about WAF Certificate and how to use it, see What is Certificate.

-> NOTE: Available in v1.135.0+.

Example Usage

Basic Usage


resource "alicloud_waf_certificate" "default" {
  certificate_name = "your_certificate_name"
  instance_id      = "your_instance_id"
  domain           = "your_domain_name"
  private_key      = "your_private_key"
  certificate      = "your_certificate"
}
resource "alicloud_waf_certificate" "default2" {
  instance_id    = "your_instance_id"
  domain         = "your_domain_name"
  certificate_id = "your_certificate_id"
}

Argument Reference

The following arguments are supported:

  • certificate - (Optional, ForceNew, Conflicts with certificate_id) Certificate file content.
  • certificate_name - (Optional, ForceNew, Conflicts with certificate_id) Certificate file name.
  • instance_id - (Required, ForceNew) The ID of the WAF instance.
  • domain - (Required, ForceNew) The domain that you want to add to WAF.
  • private_key - (Optional, ForceNew, Conflicts with certificate_id) The private key.
  • certificate_id - (Optional, ForceNew, Conflicts with certificate, certificate_name,private_key) The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

Attributes Reference

The following attributes are exported:

  • id - The resource ID of Certificate. The value formats as <instance_id>:<domain>:<certificate_id>.

Import

WAF Certificate can be imported using the id, e.g.

$ terraform import alicloud_waf_certificate.example <instance_id>:<domain>:<certificate_id>