From 80f687eea572eba0a0874994516156d8b4e32ebe Mon Sep 17 00:00:00 2001 From: David van der Spek Date: Wed, 6 Sep 2023 13:37:49 +0200 Subject: [PATCH] slightly cleanup locals Signed-off-by: David van der Spek --- bootstrap/terraform/aws-bootstrap/locals.tf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bootstrap/terraform/aws-bootstrap/locals.tf b/bootstrap/terraform/aws-bootstrap/locals.tf index 7634fb7f9..3a67e77ae 100644 --- a/bootstrap/terraform/aws-bootstrap/locals.tf +++ b/bootstrap/terraform/aws-bootstrap/locals.tf @@ -1,12 +1,12 @@ locals { sts_principal = "sts.${data.aws_partition.current.dns_suffix}" create_vpc = var.create_cluster && var.create_vpc ? true : false - private_subnet_ids = var.create_cluster ? module.vpc[0].private_subnets_ids : var.private_subnet_ids - public_subnet_ids = var.create_cluster ? module.vpc[0].public_subnets_ids : var.public_subnet_ids - worker_private_subnet_ids = var.create_cluster ? module.vpc[0].worker_private_subnets_ids : var.worker_private_subnet_ids - vpc_id = var.create_cluster ? module.vpc[0].vpc_id : data.aws_eks_cluster.cluster[0].vpc_config[0].vpc_id - cluster_id = var.create_cluster ? module.cluster[0].cluster_id : data.aws_eks_cluster.cluster[0].id - cluster_config = try(var.create_cluster ? module.cluster[0].config_map_aws_auth : tomap(false), {}) - cluster_oidc_issuer_url = var.create_cluster ? module.cluster[0].cluster_oidc_issuer_url : data.aws_eks_cluster.cluster[0].identity[0].oidc.0.issuer - cluster_endpoint = var.create_cluster ? module.cluster[0].cluster_endpoint : data.aws_eks_cluster.cluster[0].endpoint + private_subnet_ids = var.create_cluster ? one(module.vpc[*].private_subnets_ids) : var.private_subnet_ids + public_subnet_ids = var.create_cluster ? one(module.vpc[*].public_subnets_ids) : var.public_subnet_ids + worker_private_subnet_ids = var.create_cluster ? one(module.vpc[*].worker_private_subnets_ids) : var.worker_private_subnet_ids + vpc_id = var.create_cluster ? one(module.vpc[*].vpc_id) : data.aws_eks_cluster.cluster[0].vpc_config[0].vpc_id + cluster_id = var.create_cluster ? one(module.cluster[*].cluster_id) : one(data.aws_eks_cluster.cluster[*].id) + cluster_config = try(var.create_cluster ? one(module.cluster[*].config_map_aws_auth) : tomap(false), {}) + cluster_oidc_issuer_url = var.create_cluster ? one(module.cluster[*].cluster_oidc_issuer_url) : one(data.aws_eks_cluster.cluster[*].identity[0].oidc.0.issuer) + cluster_endpoint = var.create_cluster ? one(module.cluster[*].cluster_endpoint) : one(data.aws_eks_cluster.cluster[*].endpoint) }