@@ -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