From 2204a07f1cf131d7234325cf743f228226fc5afd Mon Sep 17 00:00:00 2001 From: hskiba Date: Wed, 25 Jan 2023 13:55:50 +0800 Subject: [PATCH] Add new output variables (#10) --- instances.tf | 2 +- outputs.tf | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/instances.tf b/instances.tf index ec0fb72..310fee2 100644 --- a/instances.tf +++ b/instances.tf @@ -3,7 +3,7 @@ locals { } module "spot_requests" { - source = "frgrisk/ec2-spot/aws" + source = "frgrisk/ec2-spot/aws" version = "~>0.3.2" for_each = var.spot_requests diff --git a/outputs.tf b/outputs.tf index 9809699..bfae0f6 100644 --- a/outputs.tf +++ b/outputs.tf @@ -13,7 +13,22 @@ output "private_subnets" { value = [for k, v in aws_subnet.private : v.id] } +output "private_subnets_by_az" { + description = "Map of private subnets by availability zone" + value = aws_subnet.private +} + output "public_subnets" { description = "List of IDs of public subnets" value = [for k, v in aws_subnet.public : v.id] } + +output "public_subnets_by_az" { + description = "Map of public subnets by availability zone" + value = aws_subnet.public +} + +output "inter_environment_security_group_id" { + description = "ID of the inter-environment security group" + value = module.inter_environment_traffic.security_group_id +}