The SDK should be returning a valid collation (e.g. en_US).
Actual Behavior
The SDK returns a malformed collation (e.g. en-US). The PostgreSQL resource is created by sending a valid collation (en_US), however when you read to object after creation the collation comes back malfored (en-US).
Steps to Reproduce
Using the Azure Portal create a Cloud Shell instance.
Create a directory called repro
Navigate to the new directory (cd repro)
Using nano create a file called repro.tf by copying the below Terraform HCL for PostgreSQL Resource code into the Cloud Shell session and save the file.
In Cloud Shell terminal prompt type terraform init
In Cloud Shell terminal prompt type terraform plan
In Cloud Shell terminal prompt type terraform apply
Wait for the resources to be provisioned into Azure.
In Cloud Shell terminal prompt type terraform plan, here you will see the issue. Terraform will see a change needs to be made because the SDK is returning English-United States.1252 instead of English_United States.1252 with the following output:
Terraform will perform the following actions:
-/+ module.pgsql-artifactory.azurerm_postgresql_database.pgsql_db (new resource required)
id: "/subscriptions/ID" => <computed> (forces new resource)
charset: "UTF8" => "UTF8"
collation: "English-United States.1252" => "English_United States.1252" (forces new resource)
name: "dbname" => "dbname"
resource_group_name:"rgname" => "rgname"
server_name: "srvname" => "srvname"
Plan: 1 to add, 0 to change, 1 to destroy.
------------------------------------------------------------------------
Azure-sdk-for-go Version
Expected Behavior
The SDK should be returning a valid collation (e.g. en_US).
Actual Behavior
The SDK returns a malformed collation (e.g. en-US). The PostgreSQL resource is created by sending a valid collation (en_US), however when you read to object after creation the collation comes back malfored (en-US).
Steps to Reproduce
repro
cd repro
)nano
create a file calledrepro.tf
by copying the below Terraform HCL for PostgreSQL Resource code into the Cloud Shell session and save the file.terraform init
terraform plan
terraform apply
terraform plan
, here you will see the issue. Terraform will see a change needs to be made because the SDK is returningEnglish-United States.1252
instead ofEnglish_United States.1252
with the following output:Terraform HCL for PostgreSQL Resource:
References
Terraform Issue #396 Terraform Issue #760