Skip to content

Commit

Permalink
default proxy and storage prod config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samidbb committed Dec 19, 2023
1 parent 832867e commit c1bd684
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ locals {
# DB Proxy configuration
########################################################################
proxy_name = var.proxy_name == null ? "${var.identifier}" : var.proxy_name
db_proxy_secret_arn = local.is_serverless ? try(module.db_cluster_serverless[0].cluster_master_user_secret_arn, null) : coalesce(module.db_instance[0].db_instance_master_user_secret_arn, null)

proxy_auth_config = {
db_proxy_secret_arn = var.include_proxy ? (local.is_serverless ? try(module.db_cluster_serverless[0].cluster_master_user_secret_arn, null) : try(module.db_instance[0].db_instance_master_user_secret_arn, null)) : null
proxy_auth_config = var.include_proxy ? {
(var.username) = {
description = "Proxy user for ${var.username}"
secret_arn = local.db_proxy_secret_arn # aws_secretsmanager_secret.superuser.arn
iam_auth = var.rds_proxy_iam_auth
}
}
} : {}

########################################################################
# Instance configs
Expand All @@ -77,6 +76,7 @@ locals {
config = {
prod = {
instance_class = "db.t3.micro",
allocated_storage = 20,
max_allocated_storage = 50,
port = 5432,
multi_az = true,
Expand Down

0 comments on commit c1bd684

Please sign in to comment.