Skip to content

Conversation

@lovromazgon
Copy link
Contributor

(Moving hashicorp/terraform-provider-postgresql#200 to new repository)

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.

@cyrilgdn
Copy link
Owner

@lovromazgon Thanks for moving it. I'll take a look in the next couple of days and add it to the next minor version.

@cyrilgdn cyrilgdn self-requested a review November 27, 2020 08:37
@cyrilgdn cyrilgdn added this to the 1.8.2 milestone Nov 28, 2020
Copy link
Owner

@cyrilgdn cyrilgdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix 👍

@cyrilgdn cyrilgdn merged commit 3765f18 into cyrilgdn:master Nov 30, 2020
@cyrilgdn
Copy link
Owner

FYI, this has just been released in v1.9.0.

@cyrilgdn cyrilgdn modified the milestones: 1.8.2, 1.9.0 Dec 21, 2020
michaellzc referenced this pull request in sourcegraph/terraform-provider-postgresql Oct 13, 2022
feat: create temporary file containing Google credentials
wilsonjackson referenced this pull request in Leafly-com/terraform-provider-postgresql Jan 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants