UPD: Improved outputs with more details.
This commit is contained in:
parent
c6614d4d48
commit
5a4570be72
@ -1,5 +1,4 @@
|
||||
<!-- This readme file is generated with terraform-docs -->
|
||||
# Overview
|
||||
This module performs the following tasks:
|
||||
|
||||
- Create VPC, vpcflow log
|
||||
@ -78,17 +77,16 @@ This module performs the following tasks:
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| azs | n/a |
|
||||
| private-subnet-azs | n/a |
|
||||
| private-subnet-ids | n/a |
|
||||
| private\_subnets | n/a |
|
||||
| public-route-table-id | n/a |
|
||||
| public-subnet-azs | n/a |
|
||||
| public-subnet-ids | n/a |
|
||||
| public\_subnets | n/a |
|
||||
| secondary\_cidr\_blocks | n/a |
|
||||
| vpc-cidr | n/a |
|
||||
| vpc\_id | n/a |
|
||||
| private-subnet-details | Details of private subnets |
|
||||
| private-subnet-ids | List of private subnet id |
|
||||
| private\_subnets | Private subnet cidrs |
|
||||
| public-route-table-id | Public route table id |
|
||||
| public-subnet-details | Details of public subnets |
|
||||
| public-subnet-ids | List of public subnet id |
|
||||
| public\_subnets | Public subnet cidrs |
|
||||
| secondary\_cidr\_blocks | Secondary CIDR block |
|
||||
| vpc-cidr | VPC primary cidr |
|
||||
| vpc\_id | VPC id |
|
||||
|
||||
---
|
||||
## Authorship
|
||||
|
@ -1,24 +1,30 @@
|
||||
output "vpc_id" {
|
||||
description = "VPC id"
|
||||
value = aws_vpc.vpc.id
|
||||
}
|
||||
|
||||
output "vpc-cidr" {
|
||||
description = "VPC primary cidr"
|
||||
value = aws_vpc.vpc.cidr_block
|
||||
}
|
||||
|
||||
output "public_subnets" {
|
||||
description = "Public subnet cidrs"
|
||||
value = aws_subnet.public-subnets.*.cidr_block
|
||||
}
|
||||
|
||||
output "private_subnets" {
|
||||
description = "Private subnet cidrs"
|
||||
value = aws_subnet.private-subnets.*.cidr_block
|
||||
}
|
||||
|
||||
output "public-subnet-ids" {
|
||||
description = "List of public subnet id"
|
||||
value = aws_subnet.public-subnets.*.id
|
||||
}
|
||||
|
||||
output "private-subnet-ids" {
|
||||
description = "List of private subnet id"
|
||||
value = aws_subnet.private-subnets.*.id
|
||||
}
|
||||
|
||||
@ -27,6 +33,7 @@ output "private-subnet-ids" {
|
||||
# }
|
||||
|
||||
output "public-route-table-id" {
|
||||
description = "Public route table id"
|
||||
value = aws_route_table.public-route-table.*.id
|
||||
}
|
||||
|
||||
@ -35,17 +42,29 @@ output "public-route-table-id" {
|
||||
# }
|
||||
|
||||
output "secondary_cidr_blocks" {
|
||||
description = "Secondary CIDR block"
|
||||
value = var.secondary_cidr_blocks
|
||||
}
|
||||
|
||||
output "public-subnet-azs" {
|
||||
value = distinct(aws_subnet.public-subnets.*.availability_zone)
|
||||
output "public-subnet-details" {
|
||||
description = "Details of public subnets"
|
||||
value = [
|
||||
for k, v in aws_subnet.public-subnets : {
|
||||
cidr = v.cidr_block,
|
||||
az = v.availability_zone,
|
||||
name = v.tags["Name"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
output "private-subnet-azs" {
|
||||
value = distinct(aws_subnet.private-subnets.*.availability_zone)
|
||||
output "private-subnet-details" {
|
||||
description = "Details of private subnets"
|
||||
value = [
|
||||
for k, v in aws_subnet.public-subnets : {
|
||||
cidr = v.cidr_block,
|
||||
az = v.availability_zone,
|
||||
name = v.tags["Name"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
output "azs" {
|
||||
value = data.aws_availability_zones.available-az.names
|
||||
}
|
Loading…
Reference in New Issue
Block a user