Skip to content

Commit

Permalink
removes try and adds index
Browse files Browse the repository at this point in the history
  • Loading branch information
theoskolnik committed Mar 28, 2024
1 parent d859734 commit 8c9970c
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ locals {
network_public_subnets = var.deploy_vpc ? module.networking[0].network_public_subnets : var.network_public_subnets
network_private_subnet_cidrs = var.deploy_vpc ? module.networking[0].network_private_subnet_cidrs : var.network_private_subnet_cidrs

database = try(
database =
{
name = module.database.name
password = replace(module.database.password, "$", "\\$\\$")
endpoint = module.database.endpoint
username = module.database.username
parameters = module.database.parameters
},
{
name = null
password = null
endpoint = null
username = null
parameters = null
name = module.database[0].name
password = replace(module.database[0].password, "$", "\\$\\$")
endpoint = module.database[0].endpoint
username = module.database[0].username
parameters = module.database[0].parameters
}
)

object_storage = try(
module.object_storage[0],
Expand Down

0 comments on commit 8c9970c

Please sign in to comment.