Skip to content

TF_TENCENTCLOUD_01

tongyiming edited this page Jan 25, 2024 · 3 revisions

Asset

tencentcloud_instance

Description

Ensures that CVM are using delete_with_instance and is true.

In order to release data disks when the instance is deleted.

More information: https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/latest/docs/resources/instance

Example of correct usage

resource "tencentcloud_instance" "foo" {
  instance_name     = "name"
  availability_zone = "ap-guangzhou-x"
  image_id          = "xxx"
  instance_type     = "xxx"
  system_disk_type  = "CLOUD_PREMIUM"
  data_disks {
    data_disk_type = "CLOUD_PREMIUM"
    data_disk_size = 50
    delete_with_instance = true
  }
}

Example of exception

resource "tencentcloud_instance" "foo" {
  instance_name     = "name"
  availability_zone = "ap-guangzhou-x"
  image_id          = "xxx"
  instance_type     = "xxx"
  system_disk_type  = "CLOUD_PREMIUM"
  data_disks {
    data_disk_type = "CLOUD_PREMIUM"
    data_disk_size = 50
    delete_with_instance = false
  }
}
Clone this wiki locally