Skip to content

Commit 229e255

Browse files
committed
Retain only the creation sample
1 parent 0c503a0 commit 229e255

File tree

2 files changed

+0
-224
lines changed

2 files changed

+0
-224
lines changed

mysql_instance_read_pool/main.tf

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -68,115 +68,3 @@ resource "google_sql_database_instance" "replica" {
6868
}
6969

7070
# [END cloud_sql_mysql_create_read_pool]
71-
72-
# [START cloud_sql_mysql_convert_read_replica_to_read_pool]
73-
74-
resource "google_sql_database_instance" "replica" {
75-
name = "mysql-replica"
76-
database_version = "MYSQL_8_0"
77-
region = "europe-west4"
78-
79-
master_instance_name = google_sql_database_instance.primary.name
80-
instance_type = "READ_POOL_INSTANCE"
81-
node_count = 2
82-
83-
# If you wish to, set deletion_protection to true to prevent
84-
# accidental deletion of this instance as a result of removing the
85-
# Terraform resource.
86-
deletion_protection = false
87-
88-
settings {
89-
tier = "db-perf-optimized-N-2"
90-
edition = "ENTERPRISE_PLUS"
91-
92-
ip_configuration {
93-
ipv4_enabled = true
94-
}
95-
}
96-
}
97-
98-
# [END cloud_sql_mysql_convert_read_replica_to_read_pool]
99-
100-
# [START cloud_sql_mysql_convert_read_pool_to_read_replica]
101-
102-
resource "google_sql_database_instance" "replica" {
103-
name = "mysql-replica"
104-
database_version = "MYSQL_8_0"
105-
region = "europe-west4"
106-
107-
master_instance_name = google_sql_database_instance.primary.name
108-
instance_type = "READ_REPLICA_INSTANCE"
109-
110-
# If you wish to, set deletion_protection to true to prevent
111-
# accidental deletion of this instance as a result of removing the
112-
# Terraform resource.
113-
deletion_protection = false
114-
115-
settings {
116-
tier = "db-perf-optimized-N-2"
117-
edition = "ENTERPRISE_PLUS"
118-
availability_type = "ZONAL"
119-
120-
ip_configuration {
121-
ipv4_enabled = true
122-
}
123-
}
124-
}
125-
126-
# [END cloud_sql_mysql_convert_read_pool_to_read_replica]
127-
128-
# [START cloud_sql_mysql_update_read_pool_node_count]
129-
130-
resource "google_sql_database_instance" "replica" {
131-
name = "mysql-replica"
132-
database_version = "MYSQL_8_0"
133-
region = "europe-west4"
134-
135-
master_instance_name = google_sql_database_instance.primary.name
136-
instance_type = "READ_POOL_INSTANCE"
137-
node_count = 4
138-
139-
# If you wish to, set deletion_protection to true to prevent
140-
# accidental deletion of this instance as a result of removing the
141-
# Terraform resource.
142-
deletion_protection = false
143-
144-
settings {
145-
tier = "db-perf-optimized-N-2"
146-
edition = "ENTERPRISE_PLUS"
147-
148-
ip_configuration {
149-
ipv4_enabled = true
150-
}
151-
}
152-
}
153-
154-
# [END cloud_sql_mysql_update_read_pool_node_count]
155-
156-
# [START cloud_sql_mysql_edit_read_pool_configuration]
157-
158-
resource "google_sql_database_instance" "replica" {
159-
name = "mysql-replica"
160-
database_version = "MYSQL_8_0"
161-
region = "europe-west4"
162-
163-
master_instance_name = google_sql_database_instance.primary.name
164-
instance_type = "READ_POOL_INSTANCE"
165-
node_count = 2
166-
167-
# If you wish to, set deletion_protection to true to prevent
168-
# accidental deletion of this instance as a result of removing the
169-
# Terraform resource.
170-
deletion_protection = false
171-
172-
settings {
173-
tier = "db-perf-optimized-N-4"
174-
edition = "ENTERPRISE_PLUS"
175-
176-
ip_configuration {
177-
ipv4_enabled = true
178-
}
179-
}
180-
}
181-
182-
# [END cloud_sql_mysql_edit_read_pool_configuration]

postgres_instance_read_pool/main.tf

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -67,115 +67,3 @@ resource "google_sql_database_instance" "replica" {
6767
}
6868

6969
# [END cloud_sql_postgres_create_read_pool]
70-
71-
# [START cloud_sql_postgres_convert_read_replica_to_read_pool]
72-
73-
resource "google_sql_database_instance" "replica" {
74-
name = "postgres-replica"
75-
database_version = "POSTGRES_15"
76-
region = "europe-west4"
77-
78-
master_instance_name = google_sql_database_instance.primary.name
79-
instance_type = "READ_POOL_INSTANCE"
80-
node_count = 2
81-
82-
# If you wish to, set deletion_protection to true to prevent
83-
# accidental deletion of this instance as a result of removing the
84-
# Terraform resource.
85-
deletion_protection = false
86-
87-
settings {
88-
tier = "db-perf-optimized-N-2"
89-
edition = "ENTERPRISE_PLUS"
90-
91-
ip_configuration {
92-
ipv4_enabled = true
93-
}
94-
}
95-
}
96-
97-
# [END cloud_sql_postgres_convert_read_replica_to_read_pool]
98-
99-
# [START cloud_sql_postgres_convert_read_pool_to_read_replica]
100-
101-
resource "google_sql_database_instance" "replica" {
102-
name = "postgres-replica"
103-
database_version = "POSTGRES_15"
104-
region = "europe-west4"
105-
106-
master_instance_name = google_sql_database_instance.primary.name
107-
instance_type = "READ_REPLICA_INSTANCE"
108-
109-
# If you wish to, set deletion_protection to true to prevent
110-
# accidental deletion of this instance as a result of removing the
111-
# Terraform resource.
112-
deletion_protection = false
113-
114-
settings {
115-
tier = "db-perf-optimized-N-2"
116-
edition = "ENTERPRISE_PLUS"
117-
availability_type = "ZONAL"
118-
119-
ip_configuration {
120-
ipv4_enabled = true
121-
}
122-
}
123-
}
124-
125-
# [END cloud_sql_postgres_convert_read_pool_to_read_replica]
126-
127-
# [START cloud_sql_postgres_update_read_pool_node_count]
128-
129-
resource "google_sql_database_instance" "replica" {
130-
name = "postgres-replica"
131-
database_version = "POSTGRES_15"
132-
region = "europe-west4"
133-
134-
master_instance_name = google_sql_database_instance.primary.name
135-
instance_type = "READ_POOL_INSTANCE"
136-
node_count = 4
137-
138-
# If you wish to, set deletion_protection to true to prevent
139-
# accidental deletion of this instance as a result of removing the
140-
# Terraform resource.
141-
deletion_protection = false
142-
143-
settings {
144-
tier = "db-perf-optimized-N-2"
145-
edition = "ENTERPRISE_PLUS"
146-
147-
ip_configuration {
148-
ipv4_enabled = true
149-
}
150-
}
151-
}
152-
153-
# [END cloud_sql_postgres_update_read_pool_node_count]
154-
155-
# [START cloud_sql_postgres_edit_read_pool_configuration]
156-
157-
resource "google_sql_database_instance" "replica" {
158-
name = "postgres-replica"
159-
database_version = "POSTGRES_15"
160-
region = "europe-west4"
161-
162-
master_instance_name = google_sql_database_instance.primary.name
163-
instance_type = "READ_POOL_INSTANCE"
164-
node_count = 2
165-
166-
# If you wish to, set deletion_protection to true to prevent
167-
# accidental deletion of this instance as a result of removing the
168-
# Terraform resource.
169-
deletion_protection = false
170-
171-
settings {
172-
tier = "db-perf-optimized-N-4"
173-
edition = "ENTERPRISE_PLUS"
174-
175-
ip_configuration {
176-
ipv4_enabled = true
177-
}
178-
}
179-
}
180-
181-
# [END cloud_sql_postgres_edit_read_pool_configuration]

0 commit comments

Comments
 (0)