mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +00:00
Improve google documentation (#124)
* Mention PostgreSQL in sql_database_instance docs As mentioned in hashicorp/terraform#12617 the google_sql_database_instance resource already supports `POSTGRES_9_6` as `database_version`, it is just undocumented so far. * Make naming of google_sql_database consistent Looks like this is a relict from some copy & paste from `google_storage_*` while writing the docs for `google_sql_database`. * Note that Postgres support is still BETA
This commit is contained in:
parent
8368b87cc3
commit
25c6a00ca4
|
@ -24,7 +24,7 @@ resource "google_sql_database_instance" "master" {
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_sql_database" "users" {
|
resource "google_sql_database" "users" {
|
||||||
name = "image-store-bucket"
|
name = "users"
|
||||||
instance = "${google_sql_database_instance.master.name}"
|
instance = "${google_sql_database_instance.master.name}"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -15,6 +15,11 @@ default 'root'@'%' user with no password. This user will be deleted by Terraform
|
||||||
instance creation. You should use a `google_sql_user` to define a customer user with
|
instance creation. You should use a `google_sql_user` to define a customer user with
|
||||||
a restricted host and strong password.
|
a restricted host and strong password.
|
||||||
|
|
||||||
|
~> **NOTE on Postgres support:** Configuring Postgres instances is reported to work well with this
|
||||||
|
Terraform resource however the corresponding Google-API is currently still in BETA which means it
|
||||||
|
can change in backwards-incompatible ways at any point in time which might also affect the way this
|
||||||
|
Terraform resource works when configuring Postgres instances.
|
||||||
|
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
|
@ -44,10 +49,11 @@ The following arguments are supported:
|
||||||
- - -
|
- - -
|
||||||
|
|
||||||
* `database_version` - (Optional, Default: `MYSQL_5_6`) The MySQL version to
|
* `database_version` - (Optional, Default: `MYSQL_5_6`) The MySQL version to
|
||||||
use. Can be either `MYSQL_5_6` or `MYSQL_5_7` for second-generation
|
use. Can be `MYSQL_5_6`, `MYSQL_5_7` or `POSTGRES_9_6` for second-generation
|
||||||
instances, or `MYSQL_5_5` or `MYSQL_5_6` for first-generation instances.
|
instances, or `MYSQL_5_5` or `MYSQL_5_6` for first-generation instances.
|
||||||
See Google's [Second Generation Capabilities](https://cloud.google.com/sql/docs/1st-2nd-gen-differences)
|
See Google's [Second Generation Capabilities](https://cloud.google.com/sql/docs/1st-2nd-gen-differences)
|
||||||
for more information.
|
for more information.
|
||||||
|
Note that Google's Postgres support is currently still in BETA.
|
||||||
|
|
||||||
* `name` - (Optional, Computed) The name of the instance. If the name is left
|
* `name` - (Optional, Computed) The name of the instance. If the name is left
|
||||||
blank, Terraform will randomly generate one when the instance is first
|
blank, Terraform will randomly generate one when the instance is first
|
||||||
|
@ -69,6 +75,16 @@ The required `settings` block supports:
|
||||||
* `tier` - (Required) The machine tier (First Generation) or type (Second Generation) to use. See
|
* `tier` - (Required) The machine tier (First Generation) or type (Second Generation) to use. See
|
||||||
[tiers](https://cloud.google.com/sql/docs/admin-api/v1beta4/tiers) for more details and
|
[tiers](https://cloud.google.com/sql/docs/admin-api/v1beta4/tiers) for more details and
|
||||||
supported versions.
|
supported versions.
|
||||||
|
Postgres only supports shared-core machine types (i.e. `db-f1-micro`, `db-g1-small`) and custom
|
||||||
|
machine types (see Google's [Postgres Pricing
|
||||||
|
Page](https://cloud.google.com/sql/docs/postgres/pricing)).
|
||||||
|
For custom machine types the number of CPUs and the amount of memory (expressed in `MiB = GB *
|
||||||
|
1024`) is encoded in the tier as: `db-custom-{CPUS}-{MEMORY}`. For a machine with 1 CPU and
|
||||||
|
4GB of memory the tier would be `db-custom-1-4096`, for 2 CPUs and 13GB of ram it would be
|
||||||
|
`db-custom-2-13312`.
|
||||||
|
Only certain combinations of CPU and memory are allowed, see Google's [Custom Machine Type
|
||||||
|
Documentation](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create).
|
||||||
|
Note that Google's Postgres support is currently still in BETA.
|
||||||
|
|
||||||
* `activation_policy` - (Optional) This specifies when the instance should be
|
* `activation_policy` - (Optional) This specifies when the instance should be
|
||||||
active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`.
|
active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user