EnterpriseDB / terraform-provider-biganimal

A terraform provider that uses the BigAnimal.com API in order to manage postgres clusters in the cloud
https://registry.terraform.io/providers/EnterpriseDB/biganimal/
Mozilla Public License 2.0
13 stars 1 forks source link

settings in pg_bouncer cannot be aligned during a cluster update #565

Closed sszhao1020 closed 3 months ago

sszhao1020 commented 3 months ago

Describe the bug During creating a cluster with pgBouncer disabled or (no pgbouncer block ), the terraform.tfstate will become

                        "pg_bouncer": {
                            "is_enabled": false,
                            "settings": null
                        },

During the cluster update with the PgBouncer block specified (PGB is still disabled). it always returns 1 to change (even with settings = null)

  # biganimal_cluster.single_node_cluster will be updated in-place
  ~ resource "biganimal_cluster" "single_node_cluster" {
        id                            = "prj_0gww9tNHWIS9GBLN/p-clrdlv54cm"
      ~ pg_bouncer                    = {
          + settings   = (known after apply)
            # (1 unchanged attribute hidden)
        }
        # (27 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

To Reproduce Steps to reproduce the behavior:

  1. create a cluster with pg_bouncer disabled
  2. update the cluster with pg_bouncer block specified

Expected behavior If the pg_bouncer.is_enabled is always false, validating settings is unnecessary.

Terraform and Provider Version: v0.11.0

Affected Resource(s): Please list the resources as a list, for example:

wai-wong-edb commented 3 months ago

PR here https://github.com/EnterpriseDB/terraform-provider-biganimal/pull/566