Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default proxy and storage prod config fix #52

Merged
merged 1 commit into from
Dec 20, 2023
Merged
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
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
Loading