tencentcloudstack/terraform-provider-tencentcloud

cvm key_name err

lostchai opened this issue · 1 comments

When I created a vm using a custom windows image, the expected external field key_name was returned, causing it to be rebuilt when I apply again.

Terraform v1.5.7
provider registry.terraform.io/tencentcloudstack/tencentcloud v1.81.51
-/+ resource "tencentcloud_instance" "app" {
      ~ create_time                             = "2023-11-28T07:59:24Z" -> (known after apply)
      ~ expired_time                            = "2023-12-28T07:59:24Z" -> (known after apply)
      ~ id                                      = "ins-xxxx" -> (known after apply)
      ~ instance_status                         = "RUNNING" -> (known after apply)
      ~ key_ids                                 = [] -> (known after apply)
      + key_name                                = (known after apply)

windows version: Windows Server 2016 数据中心版 64位中文版

It may be that there is an exception during the resource creation process and it is not completely successful, resulting in the status of is tainted, so must be replaced . After deleting the tainted state, it works normally