hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.29k stars 1.72k forks source link

google_netapp_storage_pool showing diff for volume_capacity_gib and volume_count #17156

Open imrannayer opened 7 months ago

imrannayer commented 7 months ago

Community Note

Terraform Version

1.6

Affected Resource(s)

google_netapp_storage_pool

Terraform Configuration

resource "google_netapp_storage_pool" "storage_pool" {
  project          = var.project_id
  location         = var.location
  name             = var.storege_pool.name
  service_level    = var.storege_pool.service_level
  capacity_gib     = var.storege_pool.size
  network          = data.google_compute_network.vpc_network[0].id
  description      = lookup(var.storege_pool, "description", null)
  labels           = merge(var.common_labels, var.storege_pool.labels)
  ldap_enabled     = var.storege_pool.ldap_enabled
  active_directory = lookup(var.storege_pool, "ad_id", null)
}

Debug Output

No response

Expected Behavior

It should not show diff

Actual Behavior

It is showing diff in output every time I execute code after creating a new pool

Changes to Outputs:
  ~ storage_pool         = {
        id                  = "projects/ci-netapp-volume-e8c4/locations/us-central1/storagePools/test-pool"
        name                = "test-pool"
      ~ volume_capacity_gib = "" -> "300"
      ~ volume_count        = 0 -> 2
        # (14 unchanged attributes hidden)
    }

Steps to reproduce

  1. terraform apply 2.terraform apply

Important Factoids

No response

References

No response

b/323501841

Mehul3217 commented 4 months ago

Can you please provide more details about the configuration for the storage pool, since with the current configuration this was not reproduced on local.

Configuration used:

  project = "test-project"
  name = "test-pool-1"
  location = "us-central1"
  service_level = "PREMIUM"
  capacity_gib = "2048"
  network = google_compute_network.peering_network.id
  description      = "description"
  labels           = {"purpose": "testing"}
  ldap_enabled     = false
  active_directory = null

If it does not occur anymore, I think we can close this.