hashicorp / terraform-provider-postgresql

As part of our introduction to self-service publishing in the Terraform Registry, this copy of the provider has been archived, and ownership has been transferred to active maintainers in the community. Please see the new location on the Terraform Registry: https://registry.terraform.io/providers/cyrilgdn/postgresql
https://github.com/cyrilgdn/terraform-provider-postgresql
Mozilla Public License 2.0
103 stars 79 forks source link

Correctly save role with quoted search path #200

Open lovromazgon opened 4 years ago

lovromazgon commented 4 years ago

Issue

When defining a search path in a PostgreSQL role which contains a hyphen it is saved as a quoted string in the DB. Once it is retrieved from the database the provider saves the quoted search path in the terraform state. Next time the changes are applied this is detected as a change that will be applied, although it actually is not a change.

Solution

When reading the search path from PostgreSQL we have to trim the quotes.