mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
replace hazardous tf patterns in docs (#3403)
* replace hazardous tf patterns with better patterns * whitespace fix
This commit is contained in:
parent
d43a1795b4
commit
0a667ddfe7
@ -59,8 +59,12 @@ data "google_kms_secret" "sql_user_password" {
|
|||||||
ciphertext = "CiQAqD+xX4SXOSziF4a8JYvq4spfAuWhhYSNul33H85HnVtNQW4SOgDu2UZ46dQCRFl5MF6ekabviN8xq+F+2035ZJ85B+xTYXqNf4mZs0RJitnWWuXlYQh6axnnJYu3kDU="
|
ciphertext = "CiQAqD+xX4SXOSziF4a8JYvq4spfAuWhhYSNul33H85HnVtNQW4SOgDu2UZ46dQCRFl5MF6ekabviN8xq+F+2035ZJ85B+xTYXqNf4mZs0RJitnWWuXlYQh6axnnJYu3kDU="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "random_id" "db_name_suffix" {
|
||||||
|
byte_length = 4
|
||||||
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "master" {
|
resource "google_sql_database_instance" "master" {
|
||||||
name = "master-instance"
|
name = "master-instance-${random_id.db_name_suffix.hex}"
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
tier = "D0"
|
tier = "D0"
|
||||||
|
@ -17,8 +17,12 @@ or the [JSON API](https://cloud.google.com/sql/docs/admin-api/v1beta4/databases)
|
|||||||
Example creating a SQL Database.
|
Example creating a SQL Database.
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
|
resource "random_id" "db_name_suffix" {
|
||||||
|
byte_length = 4
|
||||||
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "master" {
|
resource "google_sql_database_instance" "master" {
|
||||||
name = "master-instance"
|
name = "master-instance-${random_id.db_name_suffix.hex}"
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
tier = "D0"
|
tier = "D0"
|
||||||
|
@ -21,8 +21,12 @@ a restricted host and strong password.
|
|||||||
### SQL First Generation
|
### SQL First Generation
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
|
resource "random_id" "db_name_suffix" {
|
||||||
|
byte_length = 4
|
||||||
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "master" {
|
resource "google_sql_database_instance" "master" {
|
||||||
name = "master-instance"
|
name = "master-instance-${random_id.db_name_suffix.hex}"
|
||||||
database_version = "MYSQL_5_6"
|
database_version = "MYSQL_5_6"
|
||||||
# First-generation instance regions are not the conventional
|
# First-generation instance regions are not the conventional
|
||||||
# Google Compute Engine regions. See argument reference below.
|
# Google Compute Engine regions. See argument reference below.
|
||||||
@ -91,8 +95,12 @@ data "null_data_source" "auth_netw_postgres_allowed_2" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "random_id" "db_name_suffix" {
|
||||||
|
byte_length = 4
|
||||||
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "postgres" {
|
resource "google_sql_database_instance" "postgres" {
|
||||||
name = "postgres-instance"
|
name = "postgres-instance-${random_id.db_name_suffix.hex}"
|
||||||
database_version = "POSTGRES_9_6"
|
database_version = "POSTGRES_9_6"
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
@ -136,10 +144,14 @@ resource "google_service_networking_connection" "private_vpc_connection" {
|
|||||||
reserved_peering_ranges = ["${google_compute_global_address.private_ip_address.name}"]
|
reserved_peering_ranges = ["${google_compute_global_address.private_ip_address.name}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "random_id" "db_name_suffix" {
|
||||||
|
byte_length = 4
|
||||||
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "instance" {
|
resource "google_sql_database_instance" "instance" {
|
||||||
provider = "google-beta"
|
provider = "google-beta"
|
||||||
|
|
||||||
name = "private-instance"
|
name = "private-instance-${random_id.db_name_suffix.hex}"
|
||||||
region = "us-central1"
|
region = "us-central1"
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
|
@ -18,8 +18,12 @@ Creates a new Google SQL SSL Cert on a Google SQL Instance. For more information
|
|||||||
Example creating a SQL Client Certificate.
|
Example creating a SQL Client Certificate.
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
|
resource "random_id" "db_name_suffix" {
|
||||||
|
byte_length = 4
|
||||||
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "master" {
|
resource "google_sql_database_instance" "master" {
|
||||||
name = "master-instance"
|
name = "master-instance-${random_id.db_name_suffix.hex}"
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
tier = "D0"
|
tier = "D0"
|
||||||
|
@ -19,8 +19,12 @@ Creates a new Google SQL User on a Google SQL User Instance. For more informatio
|
|||||||
Example creating a SQL User.
|
Example creating a SQL User.
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
|
resource "random_id" "db_name_suffix" {
|
||||||
|
byte_length = 4
|
||||||
|
}
|
||||||
|
|
||||||
resource "google_sql_database_instance" "master" {
|
resource "google_sql_database_instance" "master" {
|
||||||
name = "master-instance"
|
name = "master-instance-${random_id.db_name_suffix.hex}"
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
tier = "D0"
|
tier = "D0"
|
||||||
|
Loading…
Reference in New Issue
Block a user