Skip to content

Commit e327419

Browse files
Merge pull request #5 from Ajay-sops/main
Postgres module fixes
2 parents e00dace + 4edf0bb commit e327419

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

examples/complete/aws/main.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ locals {
88
Department = "Engineering"
99
}
1010
store_password_to_secret_manager = true
11-
custom_credentials_enabled = true
11+
custom_credentials_enabled = false
1212
custom_credentials_config = {
1313
postgres_password = "60rbJs901a6Oa9hzUM5x7s8Q"
1414
repmgr_password = "IWHLlEYOt25jL4Io7pancB"
@@ -35,9 +35,5 @@ module "postgresql" {
3535
storage_class = "gp2"
3636
postgresql_values = file("./helm/postgresql.yaml")
3737
store_password_to_secret_manager = local.store_password_to_secret_manager
38-
custom_credentials_enabled = local.custom_credentials_enabled
39-
custom_credentials_config = local.custom_credentials_config
40-
postgres_password = local.custom_credentials_enabled ? "" : module.aws.postgresql_credential.postgres_password
41-
repmgr_password = local.custom_credentials_enabled ? "" : module.aws.postgresql_credential.repmgr_password
4238
}
4339
}

modules/resources/aws/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,15 @@ variable "store_password_to_secret_manager" {
3939
type = bool
4040
default = false
4141
}
42+
43+
variable "postgresql_config" {
44+
description = "Custom credentials configuration."
45+
default = {
46+
name = ""
47+
environment = ""
48+
replicaCount = 3
49+
storage_class = "gp2"
50+
postgresql_values = ""
51+
store_password_to_secret_manager = true
52+
}
53+
}

0 commit comments

Comments
 (0)