nutanix / terraform-provider-nutanix

Terraform Nutanix Provider
https://www.terraform.io/docs/providers/nutanix/
Mozilla Public License 2.0
101 stars 112 forks source link

nutanix_image version always shows changes #682

Open drofloh opened 5 months ago

drofloh commented 5 months ago

Nutanix Cluster Information

Terraform Version

Terraform v1.9.0 on darwin_arm64

Affected Resource(s)

Terraform Configuration Files

resource "nutanix_image" "rocky9" {
  name        = "Rocky9"
  description = "Public Rocky9 Base Image sourced from https://dl.rockylinux.org/pub/rocky/9/images/x86_64/${var.rocky9_image_name}"
  source_uri  = "https://dl.rockylinux.org/pub/rocky/9/images/x86_64/${var.rocky9_image_name}"
  checksum = {
    checksum_algorithm = "SHA_256"
    checksum_value     = var.rocky9_image_checksum
  }
  version = {
    product_name    = "Rocky9"
    product_version = var.rocky9_image_name
  }
}

Issue

With the above code, everytime we run terraform it always shows changes to the "version" even though its not being changed.

It should say no changes.

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # nutanix_image.rocky9 will be updated in-place
  ~ resource "nutanix_image" "rocky9" {
        id                             = "fefc7ecd-050d-463e-a14b-e96d2e6c62b2"
        name                           = "Rocky9"
      ~ version                        = {
          + "product_name"    = "Rocky9"
          + "product_version" = "Rocky-9-GenericCloud-LVM-9.4-20240609.0.x86_64.qcow2"
        }
        # (12 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.