From 8ca9cfa229ba97eb831d9d188024ea9345511a08 Mon Sep 17 00:00:00 2001 From: Minoru Mizutani Date: Sun, 18 Dec 2022 10:35:54 +0900 Subject: [PATCH 01/19] Add `enable_private_path_for_google_cloud_services` property to `google_sql_database_instance` --- mmv1/products/sql/api.yaml | 5 +++ .../resource_sql_database_instance.go.erb | 44 ++++++++++++------- ...resource_sql_database_instance_test.go.erb | 2 +- .../r/sql_database_instance.html.markdown | 11 +++-- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/mmv1/products/sql/api.yaml b/mmv1/products/sql/api.yaml index 1f408c46ef84..2fc520355f2c 100644 --- a/mmv1/products/sql/api.yaml +++ b/mmv1/products/sql/api.yaml @@ -351,6 +351,11 @@ objects: description: | Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP. + - !ruby/object:Api::Type::Boolean + name: 'enablePrivatePathForGoogleCloudServices' + description: | + Whether Google Cloud services such as BigQuery are allowed to + access data in this Cloud SQL instance over a private IP connection. - !ruby/object:Api::Type::String name: 'tier' description: | diff --git a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb index 30b9f5847df9..e46d4ff3c306 100644 --- a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb +++ b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb @@ -55,6 +55,7 @@ var ( "settings.0.ip_configuration.0.require_ssl", "settings.0.ip_configuration.0.private_network", "settings.0.ip_configuration.0.allocated_ip_range", + "settings.0.ip_configuration.0.enable_private_path_for_google_cloud_services", } maintenanceWindowKeys = []string{ @@ -180,14 +181,14 @@ func resourceSqlDatabaseInstance() *schema.Resource { "start_date": { Type: schema.TypeString, Required: true, - Description: `Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01`, - }, - "time": { + Description: `Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01`, + }, + "time": { Type: schema.TypeString, Required: true, Description: `Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00`, - }, - + }, + }, }, }, @@ -397,6 +398,13 @@ is set to true. Defaults to ZONAL.`, AtLeastOneOf: ipConfigurationKeys, Description: `The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?.`, }, + "enable_private_path_for_google_cloud_services": { + Type: schema.TypeBool, + Optional: true, + Default: false, + AtLeastOneOf: ipConfigurationKeys, + Description: `Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection.`, + }, }, }, }, @@ -921,7 +929,7 @@ func resourceSqlDatabaseInstanceCreate(d *schema.ResourceData, meta interface{}) if err := d.Set("name", name); err != nil { return fmt.Errorf("Error setting name: %s", err) } - + // SQL Instances that fail to create are expensive- see https://github.com/hashicorp/terraform-provider-google/issues/7154 // We can fail fast to stop instance names from getting reserved. network := d.Get("settings.0.ip_configuration.0.private_network").(string) @@ -1211,12 +1219,13 @@ func expandIpConfiguration(configured []interface{}) *sqladmin.IpConfiguration { _ipConfiguration := configured[0].(map[string]interface{}) return &sqladmin.IpConfiguration{ - Ipv4Enabled: _ipConfiguration["ipv4_enabled"].(bool), - RequireSsl: _ipConfiguration["require_ssl"].(bool), - PrivateNetwork: _ipConfiguration["private_network"].(string), - AllocatedIpRange: _ipConfiguration["allocated_ip_range"].(string), - AuthorizedNetworks: expandAuthorizedNetworks(_ipConfiguration["authorized_networks"].(*schema.Set).List()), - ForceSendFields: []string{"Ipv4Enabled", "RequireSsl"}, + Ipv4Enabled: _ipConfiguration["ipv4_enabled"].(bool), + RequireSsl: _ipConfiguration["require_ssl"].(bool), + PrivateNetwork: _ipConfiguration["private_network"].(string), + AllocatedIpRange: _ipConfiguration["allocated_ip_range"].(string), + AuthorizedNetworks: expandAuthorizedNetworks(_ipConfiguration["authorized_networks"].(*schema.Set).List()), + EnablePrivatePathForGoogleCloudServices: _ipConfiguration["enable_private_path_for_google_cloud_services"].(bool), + ForceSendFields: []string{"Ipv4Enabled", "RequireSsl", "EnablePrivatePathForGoogleCloudServices"}, } } func expandAuthorizedNetworks(configured []interface{}) []*sqladmin.AclEntry { @@ -1478,7 +1487,7 @@ func resourceSqlDatabaseInstanceUpdate(d *schema.ResourceData, meta interface{}) desiredSetting := d.Get("settings") var op *sqladmin.Operation var instance *sqladmin.DatabaseInstance - + // Check if the database version is being updated, because patching database version is an atomic operation and can not be // performed with other fields, we first patch database version before updating the rest of the fields. if v, ok := d.GetOk("database_version"); ok { @@ -1793,10 +1802,11 @@ func flattenDatabaseFlags(databaseFlags []*sqladmin.DatabaseFlags) []map[string] func flattenIpConfiguration(ipConfiguration *sqladmin.IpConfiguration) interface{} { data := map[string]interface{}{ - "ipv4_enabled": ipConfiguration.Ipv4Enabled, - "private_network": ipConfiguration.PrivateNetwork, - "allocated_ip_range": ipConfiguration.AllocatedIpRange, - "require_ssl": ipConfiguration.RequireSsl, + "ipv4_enabled": ipConfiguration.Ipv4Enabled, + "private_network": ipConfiguration.PrivateNetwork, + "allocated_ip_range": ipConfiguration.AllocatedIpRange, + "require_ssl": ipConfiguration.RequireSsl, + "enable_private_path_for_google_cloud_services": ipConfiguration.EnablePrivatePathForGoogleCloudServices, } if ipConfiguration.AuthorizedNetworks != nil { diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index c4a7576acb9d..6b399dc59bda 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -2013,7 +2013,7 @@ resource "google_sql_database_instance" "instance" { tier = "db-f1-micro" location_preference { zone = "us-central1-f" - secondary_zone = "us-central1-a" + secondary_zone = "us-central1-a" } ip_configuration { diff --git a/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown b/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown index 73971ee1bd4f..fb582d690518 100644 --- a/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown @@ -145,8 +145,9 @@ resource "google_sql_database_instance" "instance" { settings { tier = "db-f1-micro" ip_configuration { - ipv4_enabled = false - private_network = google_compute_network.private_network.id + ipv4_enabled = false + private_network = google_compute_network.private_network.id + enable_private_path_for_google_cloud_services = true } } } @@ -210,7 +211,7 @@ includes an up-to-date reference of supported versions. * `deletion_protection` - (Optional) Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a `terraform destroy` or `terraform apply` command that deletes the instance will fail. Defaults to `true`. - + ~> **NOTE:** This flag only protects instances from deletion within Terraform. To protect your instances from accidental deletion across all surfaces (API, gcloud, Cloud Console and Terraform), use the API flag `settings.deletion_protection_enabled`. * `restore_backup_context` - (optional) The context needed to restore the database to a backup run. This field will @@ -281,7 +282,7 @@ The optional `settings.sql_server_audit_config` subblock supports: * `upload_interval` - (Optional) How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". -* `retention_interval` - (Optional) How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +* `retention_interval` - (Optional) How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". * `time_zone` - (Optional) The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. @@ -325,6 +326,8 @@ This setting can be updated, but it cannot be removed after it is set. * `allocated_ip_range` - (Optional) The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. +* `enable_private_path_for_google_cloud_services` - (Optional) Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. + The optional `settings.ip_configuration.authorized_networks[]` sublist supports: * `expiration_time` - (Optional) The [RFC 3339](https://tools.ietf.org/html/rfc3339) From b7a602ab82e89e18593927df30a370dd4531ab4b Mon Sep 17 00:00:00 2001 From: Minoru Mizutani Date: Sun, 18 Dec 2022 11:41:49 +0900 Subject: [PATCH 02/19] Add a test case for third-party tests --- ...resource_sql_database_instance_test.go.erb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index 6b399dc59bda..521e87bde4f4 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -1972,6 +1972,44 @@ resource "google_sql_database_instance" "clone1" { `, networkName, addressRangeName, databaseName, databaseName) } +func testAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices(databaseName, networkName, addressRangeName string) string { + return fmt.Sprintf(` +data "google_compute_network" "servicenet" { + name = "%s" +} + +resource "google_compute_global_address" "foobar" { + name = "%s" + purpose = "VPC_PEERING" + address_type = "INTERNAL" + prefix_length = 16 + network = data.google_compute_network.servicenet.self_link +} + +resource "google_service_networking_connection" "foobar" { + network = data.google_compute_network.servicenet.self_link + service = "servicenetworking.googleapis.com" + reserved_peering_ranges = [google_compute_global_address.foobar.name] +} + +resource "google_sql_database_instance" "instance" { + depends_on = [google_service_networking_connection.foobar] + name = "%s" + region = "us-central1" + database_version = "MYSQL_5_7" + deletion_protection = false + settings { + tier = "db-f1-micro" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + enable_private_path_for_google_cloud_services = true + } + } +} +`, networkName, addressRangeName, databaseName, databaseName) +} + var testGoogleSqlDatabaseInstance_settings = ` resource "google_sql_database_instance" "instance" { name = "%s" From ebbc8083d2a5bf51ae781debb6c510e42bf81ac0 Mon Sep 17 00:00:00 2001 From: Minoru Mizutani Date: Sun, 18 Dec 2022 12:42:03 +0900 Subject: [PATCH 03/19] Add usage examples --- .../terraform/examples/sql_mysql_instance_private_ip.tf.erb | 5 +++-- .../examples/sql_postgres_instance_private_ip.tf.erb | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb b/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb index 9056ec99bdc0..d21c150c1cb4 100644 --- a/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb +++ b/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb @@ -36,8 +36,9 @@ resource "google_sql_database_instance" "<%= ctx[:primary_resource_id] %>" { settings { tier = "db-f1-micro" ip_configuration { - ipv4_enabled = "false" - private_network = google_compute_network.private_network.id + ipv4_enabled = "false" + private_network = google_compute_network.private_network.id + enable_private_path_for_google_cloud_services = true } } deletion_protection = "false" diff --git a/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb b/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb index 154849a0a011..b6a6d41ff3ee 100644 --- a/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb +++ b/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb @@ -36,8 +36,9 @@ resource "google_sql_database_instance" "<%= ctx[:primary_resource_id] %>" { settings { tier = "db-custom-2-7680" ip_configuration { - ipv4_enabled = "false" - private_network = google_compute_network.private_network.id + ipv4_enabled = "false" + private_network = google_compute_network.private_network.id + enable_private_path_for_google_cloud_services = true } } deletion_protection = "false" From d067fe0397c2e28b9483df87f194fa2a4bb7e868 Mon Sep 17 00:00:00 2001 From: Minoru Mizutani Date: Sun, 18 Dec 2022 15:39:02 +0900 Subject: [PATCH 04/19] Connect with the VCR test --- ...resource_sql_database_instance_test.go.erb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index 521e87bde4f4..a37cfe3c3620 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -889,6 +889,33 @@ func TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone(t * }) } +func TestAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices(t *testing.T) { + // Service Networking + skipIfVcr(t) + t.Parallel() + + databaseName := "tf-test-" + randString(t, 10) + addressName := "tf-test-" + randString(t, 10) + networkName := BootstrapSharedTestNetwork(t, "sql-instance-private-enable-private-path") + + vcrTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices(databaseName, networkName, addressName), + }, + { + ResourceName: "google_sql_database_instance.instance", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + }, + }) +} + func TestAccSqlDatabaseInstance_createFromBackup(t *testing.T) { // Sqladmin client skipIfVcr(t) From e0adf14a4d7ab593b09d54415bfd993b2c367877 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Sat, 7 Jan 2023 20:30:55 +0900 Subject: [PATCH 05/19] Fix test --- .../tests/resource_sql_database_instance_test.go.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index 8558ad9f8797..db730fa867c0 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -2037,7 +2037,7 @@ resource "google_sql_database_instance" "clone1" { func testAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices(databaseName, networkName, addressRangeName string) string { return fmt.Sprintf(` data "google_compute_network" "servicenet" { - name = "%s" + name = "%s" } resource "google_compute_global_address" "foobar" { @@ -2069,7 +2069,7 @@ resource "google_sql_database_instance" "instance" { } } } -`, networkName, addressRangeName, databaseName, databaseName) +`, networkName, addressRangeName, databaseName) } var testGoogleSqlDatabaseInstance_settings = ` @@ -2780,7 +2780,7 @@ func checkInstanceTypeIsPresent(resourceName string) func(*terraform.State) erro return fmt.Errorf("can't find %s in state", resourceName) } rsAttr := rs.Primary.Attributes - _, ok = rsAttr["instance_type"]; + _, ok = rsAttr["instance_type"]; if !ok { return fmt.Errorf("Instance type is not computed for %s", resourceName) } @@ -2928,4 +2928,4 @@ resource "google_sql_database_instance" "replica" { } } }`, instance, instance) -} \ No newline at end of file +} From 3c801d0f48c8fec7801615c7ac5f21e324ca5911 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Sat, 7 Jan 2023 20:32:15 +0900 Subject: [PATCH 06/19] Add note --- mmv1/products/sql/api.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/mmv1/products/sql/api.yaml b/mmv1/products/sql/api.yaml index 2fc520355f2c..2b312f63a4c5 100644 --- a/mmv1/products/sql/api.yaml +++ b/mmv1/products/sql/api.yaml @@ -356,6 +356,7 @@ objects: description: | Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. + (Requires enabling the Service Networking API (servicenetworking.googleapis.com).) - !ruby/object:Api::Type::String name: 'tier' description: | From a86ce99fcb4c1c9ca624982668149b64e48c9077 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Sun, 8 Jan 2023 13:35:55 +0900 Subject: [PATCH 07/19] Make fail-safe --- mmv1/products/sql/api.yaml | 2 +- .../resource_sql_database_instance.go.erb | 17 ++++++++++++++--- .../docs/r/sql_database_instance.html.markdown | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/mmv1/products/sql/api.yaml b/mmv1/products/sql/api.yaml index 2b312f63a4c5..140e898740b2 100644 --- a/mmv1/products/sql/api.yaml +++ b/mmv1/products/sql/api.yaml @@ -356,7 +356,7 @@ objects: description: | Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. - (Requires enabling the Service Networking API (servicenetworking.googleapis.com).) + SQLSERVER database type is not supported. - !ruby/object:Api::Type::String name: 'tier' description: | diff --git a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb index 4f2c82528cc7..0a213356efa9 100644 --- a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb +++ b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb @@ -112,6 +112,7 @@ func resourceSqlDatabaseInstance() *schema.Resource { CustomizeDiff: customdiff.All( customdiff.ForceNewIfChange("settings.0.disk_size", isDiskShrinkage), privateNetworkCustomizeDiff, + privatePathForGoogleCloudServicesSqlServerOnlyCustomizeDiff, pitrPostgresOnlyCustomizeDiff, ), @@ -401,9 +402,8 @@ is set to true. Defaults to ZONAL.`, "enable_private_path_for_google_cloud_services": { Type: schema.TypeBool, Optional: true, - Default: false, AtLeastOneOf: ipConfigurationKeys, - Description: `Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection.`, + Description: `Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.`, }, }, }, @@ -895,6 +895,17 @@ func privateNetworkCustomizeDiff(_ context.Context, d *schema.ResourceDiff, meta return nil } +// The private path for Google Cloud Services option of the IP configuration is supported only on MySQL and PostgreSQL database types. +// The API returns an invalid request error for an attempt to enable or explicitly disable this option on SQL Server type instances. +func privatePathForGoogleCloudServicesSqlServerOnlyCustomizeDiff(_ context.Context, diff *schema.ResourceDiff, v interface{}) error { + enablePrivPath := diff.Get("settings.0.ip_configuration.0.enable_private_path_for_google_cloud_services").(bool) + dbVersion := diff.Get("database_version").(string) + if enablePrivPath != nil && strings.Contains(dbVersion, "SQLSERVER") { + return fmt.Errorf("enable_private_path_for_google_cloud_services is not supported on SQL Server database types.") + } + return nil +} + // Point in time recovery for MySQL database instances needs binary_log_enabled set to true and // not point_in_time_recovery_enabled, which is confusing to users. This checks for // point_in_time_recovery_enabled being set to a non-PostgreSQL database instance and suggests @@ -1235,7 +1246,7 @@ func expandIpConfiguration(configured []interface{}) *sqladmin.IpConfiguration { AllocatedIpRange: _ipConfiguration["allocated_ip_range"].(string), AuthorizedNetworks: expandAuthorizedNetworks(_ipConfiguration["authorized_networks"].(*schema.Set).List()), EnablePrivatePathForGoogleCloudServices: _ipConfiguration["enable_private_path_for_google_cloud_services"].(bool), - ForceSendFields: []string{"Ipv4Enabled", "RequireSsl", "EnablePrivatePathForGoogleCloudServices"}, + ForceSendFields: []string{"Ipv4Enabled", "RequireSsl"}, } } func expandAuthorizedNetworks(configured []interface{}) []*sqladmin.AclEntry { diff --git a/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown b/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown index 9ca754e90b79..f70a18c86915 100644 --- a/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown @@ -326,7 +326,7 @@ This setting can be updated, but it cannot be removed after it is set. * `allocated_ip_range` - (Optional) The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. -* `enable_private_path_for_google_cloud_services` - (Optional) Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. +* `enable_private_path_for_google_cloud_services` - (Optional) Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. The optional `settings.ip_configuration.authorized_networks[]` sublist supports: From fa99805c8734f621d35f90b9158dd61fb9cf4fce Mon Sep 17 00:00:00 2001 From: mmizutani Date: Sat, 14 Jan 2023 18:36:26 +0900 Subject: [PATCH 08/19] format --- .../terraform/resources/resource_sql_database_instance.go.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb index 0a213356efa9..7094d3c5d81f 100644 --- a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb +++ b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb @@ -1249,6 +1249,7 @@ func expandIpConfiguration(configured []interface{}) *sqladmin.IpConfiguration { ForceSendFields: []string{"Ipv4Enabled", "RequireSsl"}, } } + func expandAuthorizedNetworks(configured []interface{}) []*sqladmin.AclEntry { an := make([]*sqladmin.AclEntry, 0, len(configured)) for _, _acl := range configured { From 52e8a4aad56ece0ca16b8f98638c63a5c6dc41f8 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Sat, 14 Jan 2023 18:37:04 +0900 Subject: [PATCH 09/19] Upgrade the tier of POSTGRES instances for faster instance creation --- .../tests/resource_sql_database_instance_test.go.erb | 10 +++++----- .../terraform/utils/bootstrap_utils_test.go | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index db730fa867c0..3d76e94760b0 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -2322,7 +2322,7 @@ resource "google_sql_database_instance" "instance" { deletion_protection = false settings { - tier = "db-f1-micro" + tier = "db-custom-1-3840" availability_type = "REGIONAL" @@ -2468,7 +2468,7 @@ resource "google_sql_database_instance" "instance" { deletion_protection = false settings { - tier = "db-f1-micro" + tier = "db-custom-1-3840" insights_config { query_insights_enabled = true @@ -2625,7 +2625,7 @@ resource "google_sql_database_instance" "instance" { database_version = "POSTGRES_9_6" deletion_protection = false settings { - tier = "db-f1-micro" + tier = "db-custom-1-3840" backup_configuration { enabled = true start_time = "00:00" @@ -2686,7 +2686,7 @@ resource "google_sql_database_instance" "instance" { region = "us-central1" settings { - tier = "db-f1-micro" + tier = "db-custom-1-3840" backup_configuration { enabled = "false" } @@ -2747,7 +2747,7 @@ resource "google_sql_database_instance" "instance" { region = "us-central1" settings { - tier = "db-f1-micro" + tier = "db-custom-1-3840" backup_configuration { enabled = false } diff --git a/mmv1/third_party/terraform/utils/bootstrap_utils_test.go b/mmv1/third_party/terraform/utils/bootstrap_utils_test.go index 222f6047c822..2e9e884651f0 100644 --- a/mmv1/third_party/terraform/utils/bootstrap_utils_test.go +++ b/mmv1/third_party/terraform/utils/bootstrap_utils_test.go @@ -418,7 +418,10 @@ func BootstrapSharedSQLInstanceBackupRun(t *testing.T) string { PointInTimeRecoveryEnabled: true, } settings := &sqladmin.Settings{ - Tier: "db-f1-micro", + // Creation of a shared core tier ("db-f1-micro") instance of the POSTGRES database type in the us-central1 region + // sometimes takes longer than 30 minutes, causing timeout errors in dependent tests and making the CI tests flaky. + // So selecting a non shared core instance tier is more desirable as of this writing. + Tier: "db-custom-1-3840", BackupConfiguration: backupConfig, } bootstrapInstance = &sqladmin.DatabaseInstance{ From 53f14d31c8bf9028823fdfbffe7b175e1af65053 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Sat, 14 Jan 2023 19:17:49 +0900 Subject: [PATCH 10/19] Fix type error --- .../terraform/resources/resource_sql_database_instance.go.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb index 7094d3c5d81f..dc72b224a332 100644 --- a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb +++ b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb @@ -900,7 +900,7 @@ func privateNetworkCustomizeDiff(_ context.Context, d *schema.ResourceDiff, meta func privatePathForGoogleCloudServicesSqlServerOnlyCustomizeDiff(_ context.Context, diff *schema.ResourceDiff, v interface{}) error { enablePrivPath := diff.Get("settings.0.ip_configuration.0.enable_private_path_for_google_cloud_services").(bool) dbVersion := diff.Get("database_version").(string) - if enablePrivPath != nil && strings.Contains(dbVersion, "SQLSERVER") { + if enablePrivPath && strings.Contains(dbVersion, "SQLSERVER") { return fmt.Errorf("enable_private_path_for_google_cloud_services is not supported on SQL Server database types.") } return nil From 9c2cb7934dc6e7cebb421451809394e05ed859aa Mon Sep 17 00:00:00 2001 From: mmizutani Date: Sun, 15 Jan 2023 18:18:31 +0900 Subject: [PATCH 11/19] Also upgrade mysql tier to non shared core in another tiimeout sensitive flaky test --- .../terraform/tests/resource_sql_database_instance_test.go.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index 8ae0fc8d2152..512531d30d50 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -1833,7 +1833,7 @@ resource "google_sql_database_instance" "instance" { database_version = "MYSQL_5_7" deletion_protection = false settings { - tier = "db-f1-micro" + tier = "db-n1-standard-1" ip_configuration { ipv4_enabled = "false" private_network = data.google_compute_network.servicenet.self_link From fc399bea2d6f5ff96605feed057f4bb7697d6da0 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Thu, 26 Jan 2023 03:24:11 +0900 Subject: [PATCH 12/19] Revert "Also upgrade mysql tier to non shared core in another timeout sensitive flaky test" This reverts commit 9c2cb7934dc6e7cebb421451809394e05ed859aa. --- .../terraform/tests/resource_sql_database_instance_test.go.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index 4fd9eb7e7d95..4a566ad7b2a4 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -1837,7 +1837,7 @@ resource "google_sql_database_instance" "instance" { database_version = "MYSQL_5_7" deletion_protection = false settings { - tier = "db-n1-standard-1" + tier = "db-f1-micro" ip_configuration { ipv4_enabled = "false" private_network = data.google_compute_network.servicenet.self_link From c454b9e6e9a2d0bc40004eb6beeb9263e1efe4fc Mon Sep 17 00:00:00 2001 From: mmizutani Date: Thu, 26 Jan 2023 03:28:52 +0900 Subject: [PATCH 13/19] Revert "Upgrade the tier of POSTGRES instances for faster instance creation" This reverts commit 52e8a4aad56ece0ca16b8f98638c63a5c6dc41f8. --- .../tests/resource_sql_database_instance_test.go.erb | 8 ++++---- mmv1/third_party/terraform/utils/bootstrap_utils_test.go | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index 4a566ad7b2a4..f77dc3e353d6 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -2358,7 +2358,7 @@ resource "google_sql_database_instance" "instance" { deletion_protection = false settings { - tier = "db-custom-1-3840" + tier = "db-f1-micro" availability_type = "REGIONAL" @@ -2504,7 +2504,7 @@ resource "google_sql_database_instance" "instance" { deletion_protection = false settings { - tier = "db-custom-1-3840" + tier = "db-f1-micro" insights_config { query_insights_enabled = true @@ -2723,7 +2723,7 @@ resource "google_sql_database_instance" "instance" { region = "us-central1" settings { - tier = "db-custom-1-3840" + tier = "db-f1-micro" backup_configuration { enabled = "false" } @@ -2784,7 +2784,7 @@ resource "google_sql_database_instance" "instance" { region = "us-central1" settings { - tier = "db-custom-1-3840" + tier = "db-f1-micro" backup_configuration { enabled = false } diff --git a/mmv1/third_party/terraform/utils/bootstrap_utils_test.go b/mmv1/third_party/terraform/utils/bootstrap_utils_test.go index 2e9e884651f0..222f6047c822 100644 --- a/mmv1/third_party/terraform/utils/bootstrap_utils_test.go +++ b/mmv1/third_party/terraform/utils/bootstrap_utils_test.go @@ -418,10 +418,7 @@ func BootstrapSharedSQLInstanceBackupRun(t *testing.T) string { PointInTimeRecoveryEnabled: true, } settings := &sqladmin.Settings{ - // Creation of a shared core tier ("db-f1-micro") instance of the POSTGRES database type in the us-central1 region - // sometimes takes longer than 30 minutes, causing timeout errors in dependent tests and making the CI tests flaky. - // So selecting a non shared core instance tier is more desirable as of this writing. - Tier: "db-custom-1-3840", + Tier: "db-f1-micro", BackupConfiguration: backupConfig, } bootstrapInstance = &sqladmin.DatabaseInstance{ From 9499f5b30dc511f1abdc74268d19556932d7abc8 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Fri, 3 Feb 2023 10:00:39 +0900 Subject: [PATCH 14/19] Merge TestAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices into an existing test case step --- ...resource_sql_database_instance_test.go.erb | 97 ++++++------------- 1 file changed, 28 insertions(+), 69 deletions(-) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index c39fd6c5d98b..fb3afc6ddf1b 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -222,7 +222,7 @@ func TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls(t *tes CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressName), + Config: testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressName, false, false), }, { PreConfig: func() { @@ -776,7 +776,25 @@ func TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(t *te CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressName), + Config: testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressName, false, false), + }, + { + ResourceName: "google_sql_database_instance.instance", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + { + Config: testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressName, true, false), + }, + { + ResourceName: "google_sql_database_instance.instance", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + { + Config: testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressName, true, true), }, { ResourceName: "google_sql_database_instance.instance", @@ -892,33 +910,6 @@ func TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone(t * }) } -func TestAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices(t *testing.T) { - // Service Networking - skipIfVcr(t) - t.Parallel() - - databaseName := "tf-test-" + randString(t, 10) - addressName := "tf-test-" + randString(t, 10) - networkName := BootstrapSharedTestNetwork(t, "sql-instance-private-enable-private-path") - - vcrTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), - Steps: []resource.TestStep{ - { - Config: testAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices(databaseName, networkName, addressName), - }, - { - ResourceName: "google_sql_database_instance.instance", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"deletion_protection"}, - }, - }, - }) -} - func TestAccSqlDatabaseInstance_createFromBackup(t *testing.T) { // Sqladmin client skipIfVcr(t) @@ -1852,7 +1843,12 @@ resource "google_sql_database_instance" "instance-failover" { `, instanceName, failoverName) } -func testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressRangeName string) string { +func testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressRangeName string, specifyPrivatePathOption bool, enablePrivatePath bool) string { + privatePathOption := "" + if specifyPrivatePathOption { + privatePathOption = fmt.Sprintf("enable_private_path_for_google_cloud_services = %t", enablePrivatePath) + } + return fmt.Sprintf(` data "google_compute_network" "servicenet" { name = "%s" @@ -1883,10 +1879,11 @@ resource "google_sql_database_instance" "instance" { ip_configuration { ipv4_enabled = "false" private_network = data.google_compute_network.servicenet.self_link + %s } } } -`, networkName, addressRangeName, databaseName) +`, networkName, addressRangeName, databaseName, privatePathOption) } func testAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange(databaseName, networkName, addressRangeName string) string { @@ -2112,44 +2109,6 @@ resource "google_sql_database_instance" "clone1" { `, networkName, addressRangeName, databaseName, databaseName) } -func testAccSqlDatabaseInstance_withPrivateNetwork_withEnablePrivatePathForGoogleCloudServices(databaseName, networkName, addressRangeName string) string { - return fmt.Sprintf(` -data "google_compute_network" "servicenet" { - name = "%s" -} - -resource "google_compute_global_address" "foobar" { - name = "%s" - purpose = "VPC_PEERING" - address_type = "INTERNAL" - prefix_length = 16 - network = data.google_compute_network.servicenet.self_link -} - -resource "google_service_networking_connection" "foobar" { - network = data.google_compute_network.servicenet.self_link - service = "servicenetworking.googleapis.com" - reserved_peering_ranges = [google_compute_global_address.foobar.name] -} - -resource "google_sql_database_instance" "instance" { - depends_on = [google_service_networking_connection.foobar] - name = "%s" - region = "us-central1" - database_version = "MYSQL_5_7" - deletion_protection = false - settings { - tier = "db-f1-micro" - ip_configuration { - ipv4_enabled = false - private_network = data.google_compute_network.servicenet.self_link - enable_private_path_for_google_cloud_services = true - } - } -} -`, networkName, addressRangeName, databaseName) -} - var testGoogleSqlDatabaseInstance_settings = ` resource "google_sql_database_instance" "instance" { name = "%s" From db73c43deb143c458fb5420745cf811e292a42be Mon Sep 17 00:00:00 2001 From: mmizutani Date: Fri, 3 Feb 2023 10:05:00 +0900 Subject: [PATCH 15/19] Remove the custom pre-apply validation logic and let users face the bad request error for invalid combination of parameters returned from the SQL Admin API --- .../resources/resource_sql_database_instance.go.erb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb index 4459a90ebf83..ad3be3a40ab6 100644 --- a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb +++ b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb @@ -112,7 +112,6 @@ func resourceSqlDatabaseInstance() *schema.Resource { CustomizeDiff: customdiff.All( customdiff.ForceNewIfChange("settings.0.disk_size", isDiskShrinkage), privateNetworkCustomizeDiff, - privatePathForGoogleCloudServicesSqlServerOnlyCustomizeDiff, pitrSupportDbCustomizeDiff, ), @@ -895,17 +894,6 @@ func privateNetworkCustomizeDiff(_ context.Context, d *schema.ResourceDiff, meta return nil } -// The private path for Google Cloud Services option of the IP configuration is supported only on MySQL and PostgreSQL database types. -// The API returns an invalid request error for an attempt to enable or explicitly disable this option on SQL Server type instances. -func privatePathForGoogleCloudServicesSqlServerOnlyCustomizeDiff(_ context.Context, diff *schema.ResourceDiff, v interface{}) error { - enablePrivPath := diff.Get("settings.0.ip_configuration.0.enable_private_path_for_google_cloud_services").(bool) - dbVersion := diff.Get("database_version").(string) - if enablePrivPath && strings.Contains(dbVersion, "SQLSERVER") { - return fmt.Errorf("enable_private_path_for_google_cloud_services is not supported on SQL Server database types.") - } - return nil -} - // helper function to see if string within list contains a particular substring func stringContainsSlice(arr []string, str string) bool { for _, i := range arr { From 790cb32699d4f34f20167d219c2f4c455f77adf3 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Fri, 3 Feb 2023 10:26:37 +0900 Subject: [PATCH 16/19] Remove an extra blank line --- .../terraform/resources/resource_sql_database_instance.go.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb index ad3be3a40ab6..7007df19d3c2 100644 --- a/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb +++ b/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb @@ -614,7 +614,6 @@ is set to true. Defaults to ZONAL.`, ForceNew: true, }, - "root_password": { Type: schema.TypeString, Optional: true, From 8c33c639a406089be3b1227af12ede835d6149a4 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Fri, 3 Feb 2023 10:31:41 +0900 Subject: [PATCH 17/19] Revert unnecessary edit to the no-longer-used go template file --- .../terraform/examples/sql_mysql_instance_private_ip.tf.erb | 5 ++--- .../examples/sql_postgres_instance_private_ip.tf.erb | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb b/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb index d21c150c1cb4..9056ec99bdc0 100644 --- a/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb +++ b/mmv1/templates/terraform/examples/sql_mysql_instance_private_ip.tf.erb @@ -36,9 +36,8 @@ resource "google_sql_database_instance" "<%= ctx[:primary_resource_id] %>" { settings { tier = "db-f1-micro" ip_configuration { - ipv4_enabled = "false" - private_network = google_compute_network.private_network.id - enable_private_path_for_google_cloud_services = true + ipv4_enabled = "false" + private_network = google_compute_network.private_network.id } } deletion_protection = "false" diff --git a/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb b/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb index b6a6d41ff3ee..154849a0a011 100644 --- a/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb +++ b/mmv1/templates/terraform/examples/sql_postgres_instance_private_ip.tf.erb @@ -36,9 +36,8 @@ resource "google_sql_database_instance" "<%= ctx[:primary_resource_id] %>" { settings { tier = "db-custom-2-7680" ip_configuration { - ipv4_enabled = "false" - private_network = google_compute_network.private_network.id - enable_private_path_for_google_cloud_services = true + ipv4_enabled = "false" + private_network = google_compute_network.private_network.id } } deletion_protection = "false" From 9caf12d5167d05f091cd3ee28b551eeb54c942f4 Mon Sep 17 00:00:00 2001 From: mmizutani Date: Fri, 3 Feb 2023 12:02:41 +0900 Subject: [PATCH 18/19] Fix indent --- .../terraform/tests/resource_sql_database_instance_test.go.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb index fb3afc6ddf1b..2279785e680b 100644 --- a/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_sql_database_instance_test.go.erb @@ -1879,7 +1879,7 @@ resource "google_sql_database_instance" "instance" { ip_configuration { ipv4_enabled = "false" private_network = data.google_compute_network.servicenet.self_link - %s + %s } } } From 3fd6f1d156183462435344f272827c6ea159220f Mon Sep 17 00:00:00 2001 From: mmizutani Date: Fri, 3 Feb 2023 14:19:57 +0900 Subject: [PATCH 19/19] Revert unnecessary edit to mmv1/products/sql/api.yaml --- mmv1/products/sql/api.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mmv1/products/sql/api.yaml b/mmv1/products/sql/api.yaml index 1ebccbe07f65..fdceb4baa801 100644 --- a/mmv1/products/sql/api.yaml +++ b/mmv1/products/sql/api.yaml @@ -351,12 +351,6 @@ objects: description: | Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP. - - !ruby/object:Api::Type::Boolean - name: 'enablePrivatePathForGoogleCloudServices' - description: | - Whether Google Cloud services such as BigQuery are allowed to - access data in this Cloud SQL instance over a private IP connection. - SQLSERVER database type is not supported. - !ruby/object:Api::Type::String name: 'tier' description: |