alicloud_ebs_enterprise_snapshot_policy

Provides a EBS Enterprise Snapshot Policy resource. enterprise snapshot policy.

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

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"
  }
}

Argument Reference

The following arguments are supported:

cross_region_copy_info

The cross_region_copy_info supports the following:

cross_region_copy_info-regions

The cross_region_copy_info-regions supports the following:

retain_rule

The retain_rule supports the following:

schedule

The schedule supports the following:

special_retain_rules

The special_retain_rules supports the following:

special_retain_rules-rules

The special_retain_rules-rules supports the following:

storage_rule

The storage_rule supports the following:

Attributes Reference

The following attributes are exported:

Timeouts

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

Import

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

$ terraform import alicloud_ebs_enterprise_snapshot_policy.example <id>