Skip to content

Commit 4a436f3

Browse files
committed
feat(cloud_sql): add MCP instances examples
1 parent bd18567 commit 4a436f3

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

cloud_sql/mysql_instance_mcp/main.tf

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
# [START cloud_sql_mysql_instance_mcp_creation]
1818
resource "google_sql_database_instance" "mysql_mcp_creation" {
19-
name = "mysql-instance-mcp-creation"
20-
region = "us-central1"
21-
database_version = "MYSQL_8_0"
19+
name = "mysql-instance-mcp-creation"
20+
region = "us-central1"
21+
database_version = "MYSQL_8_0"
2222
deletion_protection = false
2323

2424
settings {
25-
tier = "db-perf-optimized-N-2"
25+
tier = "db-perf-optimized-N-2"
2626
edition = "ENTERPRISE_PLUS"
2727
connection_pool_config {
2828
connection_pooling_enabled = true
@@ -34,13 +34,13 @@ resource "google_sql_database_instance" "mysql_mcp_creation" {
3434
# [START cloud_sql_mysql_instance_mcp_enable]
3535
# This example shows creating an instance with MCP enabled and custom flags set.
3636
resource "google_sql_database_instance" "mysql_mcp_enable" {
37-
name = "mysql-instance-mcp-enable"
38-
region = "us-central1"
39-
database_version = "MYSQL_8_0"
37+
name = "mysql-instance-mcp-enable"
38+
region = "us-central1"
39+
database_version = "MYSQL_8_0"
4040
deletion_protection = false
4141

4242
settings {
43-
tier = "db-perf-optimized-N-2"
43+
tier = "db-perf-optimized-N-2"
4444
edition = "ENTERPRISE_PLUS"
4545
connection_pool_config {
4646
connection_pooling_enabled = true
@@ -52,13 +52,13 @@ resource "google_sql_database_instance" "mysql_mcp_enable" {
5252
# [START cloud_sql_mysql_instance_mcp_modify]
5353
# This example shows modifying the flags of an existing MCP configuration.
5454
resource "google_sql_database_instance" "mysql_mcp_modify" {
55-
name = "mysql-instance-mcp-modify"
56-
region = "us-central1"
57-
database_version = "MYSQL_8_0"
55+
name = "mysql-instance-mcp-modify"
56+
region = "us-central1"
57+
database_version = "MYSQL_8_0"
5858
deletion_protection = false
5959

6060
settings {
61-
tier = "db-perf-optimized-N-2"
61+
tier = "db-perf-optimized-N-2"
6262
edition = "ENTERPRISE_PLUS"
6363
connection_pool_config {
6464
connection_pooling_enabled = true
@@ -74,13 +74,13 @@ resource "google_sql_database_instance" "mysql_mcp_modify" {
7474
# [START cloud_sql_mysql_instance_mcp_disable]
7575
# This example shows disabling MCP on an existing instance.
7676
resource "google_sql_database_instance" "mysql_mcp_disable" {
77-
name = "mysql-instance-mcp-disable"
78-
region = "us-central1"
79-
database_version = "MYSQL_8_0"
77+
name = "mysql-instance-mcp-disable"
78+
region = "us-central1"
79+
database_version = "MYSQL_8_0"
8080
deletion_protection = false
8181

8282
settings {
83-
tier = "db-perf-optimized-N-2"
83+
tier = "db-perf-optimized-N-2"
8484
edition = "ENTERPRISE_PLUS"
8585
connection_pool_config {
8686
# Set to false to disable MCP. You can also remove the block entirely.

cloud_sql/postgres_instance_mcp/main.tf

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
# [START cloud_sql_postgres_instance_mcp_creation]
1818
resource "google_sql_database_instance" "postgres_mcp_creation" {
19-
name = "postgres-instance-mcp-creation"
20-
region = "us-central1"
21-
database_version = "POSTGRES_16"
19+
name = "postgres-instance-mcp-creation"
20+
region = "us-central1"
21+
database_version = "POSTGRES_16"
2222
deletion_protection = false
2323

2424
settings {
25-
tier = "db-perf-optimized-N-2"
25+
tier = "db-perf-optimized-N-2"
2626
edition = "ENTERPRISE_PLUS"
2727
connection_pool_config {
2828
connection_pooling_enabled = true
@@ -33,13 +33,13 @@ resource "google_sql_database_instance" "postgres_mcp_creation" {
3333

3434
# [START cloud_sql_postgres_instance_mcp_enable]
3535
resource "google_sql_database_instance" "postgres_mcp_enable" {
36-
name = "postgres-instance-mcp-enable"
37-
region = "us-central1"
38-
database_version = "POSTGRES_16"
36+
name = "postgres-instance-mcp-enable"
37+
region = "us-central1"
38+
database_version = "POSTGRES_16"
3939
deletion_protection = false
4040

4141
settings {
42-
tier = "db-perf-optimized-N-2"
42+
tier = "db-perf-optimized-N-2"
4343
edition = "ENTERPRISE_PLUS"
4444
connection_pool_config {
4545
connection_pooling_enabled = true # Set to true here
@@ -50,19 +50,19 @@ resource "google_sql_database_instance" "postgres_mcp_enable" {
5050

5151
# [START cloud_sql_postgres_instance_mcp_modify]
5252
resource "google_sql_database_instance" "postgres_mcp_modify" {
53-
name = "postgres-instance-mcp-modify"
54-
region = "us-central1"
55-
database_version = "POSTGRES_16"
53+
name = "postgres-instance-mcp-modify"
54+
region = "us-central1"
55+
database_version = "POSTGRES_16"
5656
deletion_protection = false
5757

5858
settings {
59-
tier = "db-perf-optimized-N-2"
59+
tier = "db-perf-optimized-N-2"
6060
edition = "ENTERPRISE_PLUS"
6161
connection_pool_config {
6262
connection_pooling_enabled = true
6363
flags {
6464
name = "max_pool_size" # Modify the value of an existing flag
65-
value = "2000"
65+
value = "10"
6666
}
6767
}
6868
}
@@ -71,13 +71,13 @@ resource "google_sql_database_instance" "postgres_mcp_modify" {
7171

7272
# [START cloud_sql_postgres_instance_mcp_disable]
7373
resource "google_sql_database_instance" "postgres_mcp_disable" {
74-
name = "postgres-instance-mcp-disable"
75-
region = "us-central1"
76-
database_version = "POSTGRES_16"
74+
name = "postgres-instance-mcp-disable"
75+
region = "us-central1"
76+
database_version = "POSTGRES_16"
7777
deletion_protection = false
7878

7979
settings {
80-
tier = "db-perf-optimized-N-2"
80+
tier = "db-perf-optimized-N-2"
8181
edition = "ENTERPRISE_PLUS"
8282
connection_pool_config {
8383
# Set to false to disable MCP. You can also remove the block entirely.

0 commit comments

Comments
 (0)