alicloud_ebs_enterprise_snapshot_policy_attachment

Provides a EBS Enterprise Snapshot Policy Attachment resource. Enterprise-level snapshot policy cloud disk binding relationship.

For information about EBS Enterprise Snapshot Policy Attachment and how to use it, see What is Enterprise Snapshot Policy Attachment.

Example Usage

Basic Usage

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

provider "alicloud" {
  region = "cn-hangzhou"
}

resource "alicloud_ecs_disk" "defaultJkW46o" {
  category          = "cloud_essd"
  description       = "esp-attachment-test"
  zone_id           = "cn-hangzhou-i"
  performance_level = "PL1"
  size              = "20"
  disk_name         = var.name
}

resource "alicloud_ebs_enterprise_snapshot_policy" "defaultPE3jjR" {
  status = "DISABLED"
  desc   = "DESC"
  schedule {
    cron_expression = "0 0 0 1 * ?"
  }
  enterprise_snapshot_policy_name = var.name

  target_type = "DISK"
  retain_rule {
    time_interval = "120"
    time_unit     = "DAYS"
  }
}


resource "alicloud_ebs_enterprise_snapshot_policy_attachment" "default" {
  policy_id = alicloud_ebs_enterprise_snapshot_policy.defaultPE3jjR.id
  disk_id   = alicloud_ecs_disk.defaultJkW46o.id
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

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

Import

EBS Enterprise Snapshot Policy Attachment can be imported using the id, e.g.

$ terraform import alicloud_ebs_enterprise_snapshot_policy_attachment.example <policy_id>:<disk_id>