@@ -19,9 +19,11 @@ resource "google_sql_database_instance" "mysql_mcp_creation" {
1919 name = " mysql-instance-mcp-creation"
2020 region = " us-central1"
2121 database_version = " MYSQL_8_0"
22+ deletion_protection = false
2223
2324 settings {
24- tier = " db-perf-optimized-N-2"
25+ tier = " db-perf-optimized-N-2"
26+ edition = " ENTERPRISE_PLUS"
2527 connection_pool_config {
2628 connection_pooling_enabled = true
2729 }
@@ -35,9 +37,11 @@ resource "google_sql_database_instance" "mysql_mcp_enable" {
3537 name = " mysql-instance-mcp-enable"
3638 region = " us-central1"
3739 database_version = " MYSQL_8_0"
40+ deletion_protection = false
3841
3942 settings {
40- tier = " db-perf-optimized-N-2"
43+ tier = " db-perf-optimized-N-2"
44+ edition = " ENTERPRISE_PLUS"
4145 connection_pool_config {
4246 connection_pooling_enabled = true
4347 }
@@ -51,14 +55,16 @@ resource "google_sql_database_instance" "mysql_mcp_modify" {
5155 name = " mysql-instance-mcp-modify"
5256 region = " us-central1"
5357 database_version = " MYSQL_8_0"
58+ deletion_protection = false
5459
5560 settings {
56- tier = " db-perf-optimized-N-2"
61+ tier = " db-perf-optimized-N-2"
62+ edition = " ENTERPRISE_PLUS"
5763 connection_pool_config {
5864 connection_pooling_enabled = true
5965 flags {
60- name = " max_client_connections " # Modify or add the value of an flag
61- value = " 1980 "
66+ name = " max_pool_size " # Modify or add the name and value of an flag
67+ value = " 10 "
6268 }
6369 }
6470 }
@@ -71,19 +77,15 @@ resource "google_sql_database_instance" "mysql_mcp_disable" {
7177 name = " mysql-instance-mcp-disable"
7278 region = " us-central1"
7379 database_version = " MYSQL_8_0"
80+ deletion_protection = false
7481
7582 settings {
76- tier = " db-perf-optimized-N-2"
83+ tier = " db-perf-optimized-N-2"
84+ edition = " ENTERPRISE_PLUS"
7785 connection_pool_config {
7886 # Set to false to disable MCP. You can also remove the block entirely.
7987 connection_pooling_enabled = false
8088 }
8189 }
8290}
8391# [END cloud_sql_mysql_instance_mcp_disable]
84-
85- # [START cloud_sql_mysql_instance_mcp_view]
86- # To view the current status, you can use the `terraform show` command after applying
87- # your configuration. The `connection_pool_config` block will reflect the current state.
88- terraform show
89- # [END cloud_sql_mysql_instance_mcp_view]
0 commit comments