Skip to content

Commit b69d546

Browse files
Add EnablePrivatePathForGoogleCloudServices to ForceSendFields (#7719) (#14316)
* Add EnablePrivatePathForGoogleCloudServices to ForceSendFields * Add a test Signed-off-by: Modular Magician <[email protected]>
1 parent 2445ffe commit b69d546

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.changelog/7719.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
sql: fixed an issue that prevented setting `enable_private_path_for_google_cloud_services` to `false`
3+
```

google/resource_sql_database_instance.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ func expandIpConfiguration(configured []interface{}) *sqladmin.IpConfiguration {
12601260
AllocatedIpRange: _ipConfiguration["allocated_ip_range"].(string),
12611261
AuthorizedNetworks: expandAuthorizedNetworks(_ipConfiguration["authorized_networks"].(*schema.Set).List()),
12621262
EnablePrivatePathForGoogleCloudServices: _ipConfiguration["enable_private_path_for_google_cloud_services"].(bool),
1263-
ForceSendFields: []string{"Ipv4Enabled", "RequireSsl"},
1263+
ForceSendFields: []string{"Ipv4Enabled", "RequireSsl", "EnablePrivatePathForGoogleCloudServices"},
12641264
}
12651265
}
12661266

google/resource_sql_database_instance_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,15 @@ func TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(t *te
800800
ImportStateVerify: true,
801801
ImportStateVerifyIgnore: []string{"deletion_protection"},
802802
},
803+
{
804+
Config: testAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(databaseName, networkName, addressName, true, false),
805+
},
806+
{
807+
ResourceName: "google_sql_database_instance.instance",
808+
ImportState: true,
809+
ImportStateVerify: true,
810+
ImportStateVerifyIgnore: []string{"deletion_protection"},
811+
},
803812
},
804813
})
805814
}

0 commit comments

Comments
 (0)