From 1cb37b9b6768b010dba5136801bf335c3498d732 Mon Sep 17 00:00:00 2001 From: gentgme Date: Mon, 2 Sep 2024 15:25:00 +0200 Subject: [PATCH 1/5] adapted outputs --- outputs.tf | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/outputs.tf b/outputs.tf index 301a64f30..da1d23023 100644 --- a/outputs.tf +++ b/outputs.tf @@ -652,14 +652,24 @@ output "public_subnets_az_ids" { value = aws_subnet.public[*].availability_zone_id } -output "database_subnets_az_names" { - description = "List of AZ names of database subnets" - value = aws_subnet.database[*].availability_zone +output "isolated_subnets_az_names" { + description = "List of AZ names of isolated subnets" + value = aws_subnet.intra[*].availability_zone } -output "database_subnets_az_ids" { - description = "List of AZ IDs of database subnets" - value = aws_subnet.database[*].availability_zone_id +output "isolated_subnets_az_ids" { + description = "List of AZ IDs of isolated subnets" + value = aws_subnet.intra[*].availability_zone_id +} + +output "tgw_subnets_az_names" { + description = "List of AZ names of tgw subnets" + value = aws_subnet.tgw[*].availability_zone +} + +output "tgw_subnets_az_ids" { + description = "List of AZ IDs of tgw subnets" + value = aws_subnet.tgw[*].availability_zone_id } ################################################################################ From 2aac58a37878d414164d730724a86e6eb39c9379 Mon Sep 17 00:00:00 2001 From: gentgme Date: Mon, 2 Sep 2024 15:36:53 +0200 Subject: [PATCH 2/5] tf fmt --- tgw.tf | 8 ++++---- variables.tf | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tgw.tf b/tgw.tf index e8b6a76a4..58424d9a2 100644 --- a/tgw.tf +++ b/tgw.tf @@ -183,7 +183,7 @@ locals { create_public_to_tgw = (local.create_public_subnets && contains(local.subnets_tgw_routed, "public")) public_to_tgw_cidr_pairs = local.create_public_to_tgw ? flatten([ for public_rtb in aws_route_table.public : [ - for cidr in var.transit_gateway_routes["public"]: { + for cidr in var.transit_gateway_routes["public"] : { rtb_id = public_rtb.id cidr = cidr } @@ -192,7 +192,7 @@ locals { } resource "aws_route" "public_to_tgw" { - for_each = local.create_public_to_tgw ? {for i, v in local.public_to_tgw_cidr_pairs : "${i}-${v.cidr}" => v} : {} + for_each = local.create_public_to_tgw ? { for i, v in local.public_to_tgw_cidr_pairs : "${i}-${v.cidr}" => v } : {} destination_cidr_block = can(regex("^pl-", each.value.cidr)) ? null : each.value.cidr destination_prefix_list_id = can(regex("^pl-", each.value.cidr)) ? each.value.cidr : null @@ -208,7 +208,7 @@ locals { create_private_to_tgw = (local.create_private_subnets && contains(local.subnets_tgw_routed, "private")) private_to_tgw_cidr_pairs = local.create_private_to_tgw ? flatten([ for private_rtb in aws_route_table.private : [ - for cidr in var.transit_gateway_routes["private"]: { + for cidr in var.transit_gateway_routes["private"] : { rtb_id = private_rtb.id cidr = cidr } @@ -217,7 +217,7 @@ locals { } resource "aws_route" "private_to_tgw" { - for_each = local.create_private_to_tgw ? {for i, v in local.private_to_tgw_cidr_pairs : "${i}-${v.cidr}" => v} : {} + for_each = local.create_private_to_tgw ? { for i, v in local.private_to_tgw_cidr_pairs : "${i}-${v.cidr}" => v } : {} destination_cidr_block = can(regex("^pl-", each.value.cidr)) ? null : each.value.cidr destination_prefix_list_id = can(regex("^pl-", each.value.cidr)) ? each.value.cidr : null diff --git a/variables.tf b/variables.tf index bfd56e37d..811811571 100644 --- a/variables.tf +++ b/variables.tf @@ -21,8 +21,8 @@ variable "name_prefix" { } variable "short_aws_region" { - type = string description = "The AWS region code where the VPC will be created" + type = string } variable "vpc_name_suffix" { From 8aaa2ab3e56187cbb0714c633ba690a563555321 Mon Sep 17 00:00:00 2001 From: gentgme Date: Mon, 2 Sep 2024 15:37:09 +0200 Subject: [PATCH 3/5] fixed intra subnet output --- outputs.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/outputs.tf b/outputs.tf index da1d23023..63225e875 100644 --- a/outputs.tf +++ b/outputs.tf @@ -652,13 +652,13 @@ output "public_subnets_az_ids" { value = aws_subnet.public[*].availability_zone_id } -output "isolated_subnets_az_names" { - description = "List of AZ names of isolated subnets" +output "intra_subnets_az_names" { + description = "List of AZ names of intra subnets" value = aws_subnet.intra[*].availability_zone } -output "isolated_subnets_az_ids" { - description = "List of AZ IDs of isolated subnets" +output "intra_subnets_az_ids" { + description = "List of AZ IDs of intra subnets" value = aws_subnet.intra[*].availability_zone_id } From a270cad0f65e0e307956dc926924e3fea5d09d25 Mon Sep 17 00:00:00 2001 From: gentgme Date: Tue, 3 Sep 2024 16:41:36 +0200 Subject: [PATCH 4/5] upped version for spacelift registry --- .spacelift/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.spacelift/config.yml b/.spacelift/config.yml index bc464466c..5b8f6a0e8 100644 --- a/.spacelift/config.yml +++ b/.spacelift/config.yml @@ -1,2 +1,2 @@ version: 1 -module_version: 0.1.0 +module_version: 0.2.0 From 186b21dae7309173abb255c94a39ee26697596c6 Mon Sep 17 00:00:00 2001 From: gentgme Date: Wed, 4 Sep 2024 09:55:15 +0200 Subject: [PATCH 5/5] readded output fpr public subnet azs --- outputs.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/outputs.tf b/outputs.tf index 63225e875..3a3e735eb 100644 --- a/outputs.tf +++ b/outputs.tf @@ -652,6 +652,16 @@ output "public_subnets_az_ids" { value = aws_subnet.public[*].availability_zone_id } +output "database_subnets_az_names" { + description = "List of AZ names of database subnets" + value = aws_subnet.database[*].availability_zone +} + +output "database_subnets_az_ids" { + description = "List of AZ IDs of database subnets" + value = aws_subnet.database[*].availability_zone_id +} + output "intra_subnets_az_names" { description = "List of AZ names of intra subnets" value = aws_subnet.intra[*].availability_zone