Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove require_ssl #19263

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/11549.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
sql: removed `settings.ip_configuration.require_ssl` from `google_sql_database_instance` in favor of `settings.ip_configuration.ssl_mode`. This field was intended to be removed in 6.0.0.
```
14 changes: 1 addition & 13 deletions google/services/sql/resource_sql_database_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,13 +443,6 @@ is set to true. Defaults to ZONAL.`,
AtLeastOneOf: ipConfigurationKeys,
Description: `Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured.`,
},
"require_ssl": {
Type: schema.TypeBool,
Optional: true,
AtLeastOneOf: ipConfigurationKeys,
Description: `Whether SSL connections over IP are enforced or not. To change this field, also set the corresponding value in ssl_mode if it has been set too.`,
Deprecated: "`require_ssl` will be fully deprecated in a future major release. For now, please use `ssl_mode` with a compatible `require_ssl` value instead.",
},
"private_network": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -498,7 +491,7 @@ is set to true. Defaults to ZONAL.`,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"ALLOW_UNENCRYPTED_AND_ENCRYPTED", "ENCRYPTED_ONLY", "TRUSTED_CLIENT_CERTIFICATE_REQUIRED"}, false),
Description: `Specify how SSL connection should be enforced in DB connections. This field provides more SSL enforcement options compared to require_ssl. To change this field, also set the correspoding value in require_ssl until next major release.`,
Description: `Specify how SSL connection should be enforced in DB connections.`,
AtLeastOneOf: ipConfigurationKeys,
},
"server_ca_mode": {
Expand Down Expand Up @@ -2271,11 +2264,6 @@ func flattenIpConfiguration(ipConfiguration *sqladmin.IpConfiguration, d *schema
data["psc_config"] = flattenPscConfigs(ipConfiguration.PscConfig)
}

// We store the ssl_mode value only if the customer already uses `ssl_mode`.
if _, ok := d.GetOk("settings.0.ip_configuration.0.ssl_mode"); ok {
data["ssl_mode"] = ipConfiguration.SslMode
}

return []map[string]interface{}{data}
}

Expand Down
4 changes: 2 additions & 2 deletions website/docs/guides/version_6_upgrade.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ Support for the deletionProtectionEnabled field has been added. Redis clusters w

## Resource: `google_sql_database_instance`

### `settings.ip_configuration.require_ssl` is now removed
### `settings.ip_configuration.require_ssl` is now removed (in 6.0.1)

Removed in favor of field `settings.ip_configuration.ssl_mode`.
Removed in favor of field `settings.ip_configuration.ssl_mode`. `settings.ip_configuration.require_ssl` was intended to be removed in 6.0.0, but is removed in 6.0.1 instead.

## Resource: `google_storage_bucket`

Expand Down