Skip to content

Commit

Permalink
Add EnablePrivatePathForGoogleCloudServices to ForceSendFields (#7719) (
Browse files Browse the repository at this point in the history
#14316)

* Add EnablePrivatePathForGoogleCloudServices to ForceSendFields

* Add a test

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Apr 13, 2023
1 parent 2445ffe commit b69d546
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/7719.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
sql: fixed an issue that prevented setting `enable_private_path_for_google_cloud_services` to `false`
```
2 changes: 1 addition & 1 deletion google/resource_sql_database_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,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"},
ForceSendFields: []string{"Ipv4Enabled", "RequireSsl", "EnablePrivatePathForGoogleCloudServices"},
}
}

Expand Down
9 changes: 9 additions & 0 deletions google/resource_sql_database_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,15 @@ func TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange(t *te
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"},
},
},
})
}
Expand Down

0 comments on commit b69d546

Please sign in to comment.