terraform-provider-postgresql icon indicating copy to clipboard operation
terraform-provider-postgresql copied to clipboard

Provider "cyrilgdn/postgresql" produced inconsistent final plan for alter_object_ownership

Open rajesharyain opened this issue 1 year ago • 0 comments

Hi there, I encountered an error when applying changes to a PostgreSQL database resource in Terraform using the cyrilgdn/postgresql provider. The provider produced inconsistent values for the alter_object_ownership attribute, switching from cty.False to null, which resulted in a failure to apply the plan.

Terraform Version

Terraform v1.5.7 on linux_amd64

  • provider registry.terraform.io/cyrilgdn/postgresql v1.22.0

Affected Resource(s)

  • postgresql_database

Terraform Configuration Files

resource "postgresql_database" "test_db" {
   name                   = "my_db"
   owner                  = "my_role"
   template          = "template0"
   encoding          = "UTF8"
   connection_limit  = -1
   allow_connections = true
}

Panic Output

Error: Provider produced inconsistent final plan
When expanding the plan for
module.service_databases[4].postgresql_database.service_db[0] to include
new values learned so far during apply, provider
"registry.terraform.io/cyrilgdn/postgresql" produced an invalid new value
for .alter_object_ownership: was cty.False, but now null.
This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected Behavior

The alter_object_ownership should remain consistent (false) during the plan and apply phases.

Actual Behavior

The value changes from false (cty.False) to null during the apply phase, causing an inconsistency error.

Steps to Reproduce

terraform apply

Important Factoids

N/A

References

N/A

rajesharyain avatar Sep 26 '24 15:09 rajesharyain