文档

alicloud_simple_application_server_snapshot

更新时间:
一键部署

Provides a Simple Application Server Snapshot resource.

For information about Simple Application Server Snapshot and how to use it, see What is Snapshot.

-> NOTE: Available since v1.143.0.

Example Usage

Basic Usage

variable "name" {
  default = "tf_example"
}

data "alicloud_simple_application_server_images" "default" {}
data "alicloud_simple_application_server_plans" "default" {}

resource "alicloud_simple_application_server_instance" "default" {
  payment_type   = "Subscription"
  plan_id        = data.alicloud_simple_application_server_plans.default.plans.0.id
  instance_name  = var.name
  image_id       = data.alicloud_simple_application_server_images.default.images.0.id
  period         = 1
  data_disk_size = 100
}

data "alicloud_simple_application_server_disks" "default" {
  instance_id = alicloud_simple_application_server_instance.default.id
}

resource "alicloud_simple_application_server_snapshot" "default" {
  disk_id       = data.alicloud_simple_application_server_disks.default.ids.0
  snapshot_name = var.name
}

Argument Reference

The following arguments are supported:

  • disk_id - (Required, ForceNew) The ID of the disk.
  • snapshot_name - (Required, ForceNew) The name of the snapshot. The name must be 2 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.),and hyphens (-).

Attributes Reference

The following attributes are exported:

  • id - The resource ID in terraform of Snapshot.
  • status - The status of the snapshot. Valid values: Progressing, Accomplished and Failed.

Timeouts

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

  • create - (Defaults to 20 mins) Used when create the Snapshot.

Import

Simple Application Server Snapshot can be imported using the id, e.g.

$ terraform import alicloud_simple_application_server_snapshot.example <id>

  • 本页导读 (0)
文档反馈