Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rajesharyain opened this issue Sep 26, 2024 · 0 comments

Comments

@rajesharyain
Copy link

rajesharyain commented Sep 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant