mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Mark google_sql_database.{charset,collation} as computed instead of having defaults (#229)
* Mark google_sql_database.{charset,collation} as computed instead of having defaults. This change is required to avoid the following scenario: When upgrading from a previous version of the Google provider, TF will change the charset/collation of existing (TF-managed) databases to utf8/utf8_general_ci (if the user hasn't added different config values before running TF apply), potentially overriding any non-default settings that the user my have applied through the Cloud SQL admin API. This violates POLA. * Remove charset/collation defaults from the documentation, too. * Add links to MySQL's and PostgreSQL's documentation about supported charset and collation values. * Use version 5.7's docs instead of 5.6, since that's the most up to date version of MySQL that we support. * Add a note that only UTF8 / en_US.UTF8 are currently supported for Cloud SQL PostgreSQL databases.
This commit is contained in:
parent
4758ef6350
commit
caeb43e39a
@ -46,13 +46,13 @@ func resourceSqlDatabase() *schema.Resource {
|
|||||||
"charset": &schema.Schema{
|
"charset": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: "utf8",
|
Computed: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
"collation": &schema.Schema{
|
"collation": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: "utf8_general_ci",
|
Computed: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,23 @@ The following arguments are supported:
|
|||||||
* `project` - (Optional) The project in which the resource belongs. If it
|
* `project` - (Optional) The project in which the resource belongs. If it
|
||||||
is not provided, the provider project is used.
|
is not provided, the provider project is used.
|
||||||
|
|
||||||
* `charset` - (Optional) The MySQL charset value (default "utf8").
|
* `charset` - (Optional) The charset value. See MySQL's [Supported Character
|
||||||
|
Sets and
|
||||||
|
Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html)
|
||||||
|
and PostgreSQL's [Character Set
|
||||||
|
Support](https://www.postgresql.org/docs/9.6/static/multibyte.html)
|
||||||
|
for more details and supported values. Note that Cloud SQL's beta
|
||||||
|
offering for PostgreSQL databases currently only supports the charset value
|
||||||
|
`UTF8`.
|
||||||
|
|
||||||
* `collation` - (Optional) The MySQL collation value (default
|
* `collation` - (Optional) The collation value. See MySQL's [Supported Character
|
||||||
"utf8_general_ci").
|
Sets and
|
||||||
|
Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html)
|
||||||
|
and PostgreSQL's [Collation
|
||||||
|
Support](https://www.postgresql.org/docs/9.6/static/collation.html) for
|
||||||
|
more details and supported values. Note that Cloud SQL's beta
|
||||||
|
offering for PostgreSQL databases currently only supports the collation
|
||||||
|
value `en_US.UTF8`.
|
||||||
|
|
||||||
## Attributes Reference
|
## Attributes Reference
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user