terraform-tofu-labs/2-simple-example/code/outputs.tf

34 lines
792 B
Terraform
Raw Normal View History

2024-04-15 22:33:12 +00:00
# VPC
output "vpc_id" {
description = "The ID of the VPC"
value = module.vpc.vpc_id
}
# Subnets
output "private_subnets" {
description = "List of IDs of private subnets"
value = module.vpc.private_subnets
}
output "public_subnets" {
description = "List of IDs of public subnets"
value = module.vpc.public_subnets
}
output "database_subnets" {
description = "List of IDs of database subnets"
value = module.vpc.database_subnets
}
# NAT gateways
output "nat_public_ips" {
description = "List of public Elastic IPs created for AWS NAT Gateway"
value = module.vpc.nat_public_ips
}
2024-04-16 15:32:58 +00:00
# Public IP of instance
2024-04-16 15:34:31 +00:00
output "instance_public_ip" {
2024-04-16 15:32:58 +00:00
description = "Show the public IP of the instance deployed"
value = aws_instance.test_ami.public_ip
}