diff --git a/examples/complete/aws/main.tf b/examples/complete/aws/main.tf index ea41bab..3afe4f6 100644 --- a/examples/complete/aws/main.tf +++ b/examples/complete/aws/main.tf @@ -8,7 +8,7 @@ locals { Department = "Engineering" } store_password_to_secret_manager = true - custom_credentials_enabled = true + custom_credentials_enabled = false custom_credentials_config = { postgres_password = "60rbJs901a6Oa9hzUM5x7s8Q" repmgr_password = "IWHLlEYOt25jL4Io7pancB" @@ -35,9 +35,5 @@ module "postgresql" { storage_class = "gp2" postgresql_values = file("./helm/postgresql.yaml") store_password_to_secret_manager = local.store_password_to_secret_manager - custom_credentials_enabled = local.custom_credentials_enabled - custom_credentials_config = local.custom_credentials_config - postgres_password = local.custom_credentials_enabled ? "" : module.aws.postgresql_credential.postgres_password - repmgr_password = local.custom_credentials_enabled ? "" : module.aws.postgresql_credential.repmgr_password } } diff --git a/modules/resources/aws/variables.tf b/modules/resources/aws/variables.tf index aebd79b..5b24df0 100644 --- a/modules/resources/aws/variables.tf +++ b/modules/resources/aws/variables.tf @@ -39,3 +39,15 @@ variable "store_password_to_secret_manager" { type = bool default = false } + +variable "postgresql_config" { + description = "Custom credentials configuration." + default = { + name = "" + environment = "" + replicaCount = 3 + storage_class = "gp2" + postgresql_values = "" + store_password_to_secret_manager = true + } +}