Skip to content
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
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