-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Azure DB for PostgreSQL collation changes automatically. #396
Comments
Hey @piotrgo Thanks for opening this issue :) In the example you've provided above, we're submitting the value Thanks |
I've run a test, and it behaves as expected when I specify en-US from the start. I did some searching, and Microsoft uses different notation that uses a hyphen instead of underscore. Do you think it's worth updating the docs in #418? Cheers |
When |
* Update PostgreSQL to GA 2017-12-01 API * Added TestCheckResourceAttr for create_mode to tests * Upgraded Go SDK to v16.2.1 to match Master Branch * Replaced 2017-04-30-preview postgreSQL API with 2017-12-01 GA API * Removed CreateMode from schema, updated tests and documentation to match * Removed createmode validation from tests * Removed createmode from two hcl sections * [Bug Fix] Fixes issues #396 and #760 * Updated validators to match master branch * Fixing a merge conflict * Removed debug fmt statement * Removed AzureRMNormalizeCollation util function * Updated replace methiod * Updated validator to use regex instead of string contains * Made charset case insensitive and added two test cases * Switching to use the fields within `.Properties` to match the API Also working around a potential crash. Tests pass: ``` $ acctests azurerm TestAccAzureRMPostgreSQLDatabase_ === RUN TestAccAzureRMPostgreSQLDatabase_importBasic --- PASS: TestAccAzureRMPostgreSQLDatabase_importBasic (402.40s) === RUN TestAccAzureRMPostgreSQLDatabase_basic --- PASS: TestAccAzureRMPostgreSQLDatabase_basic (486.39s) === RUN TestAccAzureRMPostgreSQLDatabase_charsetLowercase --- PASS: TestAccAzureRMPostgreSQLDatabase_charsetLowercase (424.71s) === RUN TestAccAzureRMPostgreSQLDatabase_charsetMixedcase --- PASS: TestAccAzureRMPostgreSQLDatabase_charsetMixedcase (424.97s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 1738.507s ```
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Hi,
We've run into an issue with newly added Azure DB for Postgres. I am not sure whether it's just a misinformation in documentation, or an actual problem with Terraform implementing Azure DB.
DB's collation changes from en_US to en-US and Terraform want's to change it.
Terraform Version
0.10.5
Affected Resource(s)
azurerm_postgresql_database
Terraform Configuration Files
Initial Plan Output
Apply runs without any problems, immediately after, another plan results with:
Expected Behavior
DB should be created with specified collation as per PGSQL documentation (underscore in collation type) and no further changes should be planned by Terraform
Actual Behavior
DB is being created fine, but on subsequent plan it is being marked for a change from en_US to en-US
Steps to Reproduce
Follow an example from the documentation for setting up Azure DB for PostgreSQL and Azure PostgreSQL DB with collation type set as per PGSQL documentation.
The text was updated successfully, but these errors were encountered: