Skip to content

Commit

Permalink
chore: remove require_ssl from examples (#673)
Browse files Browse the repository at this point in the history
Co-authored-by: Imran Nayer <[email protected]>
  • Loading branch information
ckluente-1k5 and imrannayer authored Jan 29, 2025
1 parent fc59e29 commit bbb402c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/postgresql-with-cross-region-failover/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module "pg1" {

ip_configuration = {
ipv4_enabled = false
require_ssl = true
ssl_mode = "ENCRYPTED_ONLY"
private_network = google_compute_network.default.self_link
allocated_ip_range = null
authorized_networks = [
Expand Down
2 changes: 1 addition & 1 deletion modules/postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module "pg" {
ip_configuration = {
ipv4_enabled = true
require_ssl = true
ssl_mode = "ENCRYPTED_ONLY" // can also be ALLOW_UNENCRYPTED_AND_ENCRYPTED
private_network = null
allocated_ip_range = null
authorized_networks = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestPostgreSqlCrossRegionFailover(t *testing.T) {
// assert general database settings
assert.Equal("REGIONAL", op.Get("settings.availabilityType").String(), "Expected REGIONAL availabilityType")
assert.Equal("PD_SSD", op.Get("settings.dataDiskType").String(), "Expected PD_SSD dataDiskType")
assert.Equal("ALLOW_UNENCRYPTED_AND_ENCRYPTED", op.Get("settings.ipConfiguration.sslMode").String(), "Expected ssl_mode")
assert.Equal("ENCRYPTED_ONLY", op.Get("settings.ipConfiguration.sslMode").String(), "Expected ssl_mode")

// assert user labels
assert.JSONEq(`{"foo": "bar", "instance": "instance-1"}`, op.Get("settings.userLabels").Raw, `Expected {"foo": "bar", "instance": "instance-1"} userLabels`)
Expand All @@ -85,7 +85,7 @@ func TestPostgreSqlCrossRegionFailover(t *testing.T) {
assert.Equal(int64(365), op.Get("settings.backupConfiguration.backupRetentionSettings.retainedBackups").Int(), "Expected 365 backupConfigurationRetainedBackups")
assert.Equal("COUNT", op.Get("settings.backupConfiguration.backupRetentionSettings.retentionUnit").String(), "Expected COUNT backupConfigurationRetentionUnit")
assert.True(op.Get("settings.backupConfiguration.pointInTimeRecoveryEnabled").Bool(), "Expected TRUE")
assert.Equal("ALLOW_UNENCRYPTED_AND_ENCRYPTED", op.Get("settings.ipConfiguration.sslMode").String(), "Expected ssl_mode")
assert.Equal("ENCRYPTED_ONLY", op.Get("settings.ipConfiguration.sslMode").String(), "Expected ssl_mode")
assert.Equal("14", op.Get("settings.backupConfiguration.transactionLogRetentionDays").String(), "Expected transactionLogRetentionDays 14")

// assert Encryption configuration
Expand Down

0 comments on commit bbb402c

Please sign in to comment.