-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoutput.tf
94 lines (76 loc) · 2.86 KB
/
output.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
output "id" {
value = aws_vpc.vpc.id
description = "ID of VPC created"
}
output "cidr" {
value = aws_vpc.vpc.cidr_block
description = "CIDR block of VPC created"
}
output "public_subnet_ids" {
value = aws_subnet.pub_sub.*.id
description = "List of public subnets id"
}
output "public_subnet_cidrs" {
value = aws_subnet.pub_sub.*.cidr_block
description = "List of public subnet CIDR block"
}
output "public_subnet_rtb" {
value = aws_route_table.pub_rtb.id
description = "ID of public route table created"
}
output "private_subnet_ids" {
value = aws_subnet.pvt_sub.*.id
description = "List of private subnet id"
}
output "private_subnet_cidrs" {
value = aws_subnet.pvt_sub.*.cidr_block
description = "List of private subnet CIDR block"
}
output "private_subnet_rtb" {
value = var.create_pvt_nat ? join(",", aws_route_table.pvt_nat_rtb.*.id) : join(",", aws_route_table.pvt_rtb.*.id)
description = "ID of private route table created"
}
output "data_subnet_ids" {
value = aws_subnet.data_sub.*.id
description = "List of data subnet id"
}
output "data_subnet_cidrs" {
value = aws_subnet.data_sub.*.cidr_block
description = "List of data subnet CIDR block"
}
output "data_subnet_rtb" {
value = var.create_data_nat ? join(",", aws_route_table.data_nat_rtb.*.id) : join(",", aws_route_table.data_rtb.*.id)
description = "ID of data route table created"
}
output "pvt_nat_public_ip" {
value = var.create_pvt_nat ? aws_nat_gateway.nat_gw.*.public_ip : null
description = "List of Elastic IP associated to Private NAT gateway(s)"
}
output "data_nat_public_ip" {
value = var.create_data_nat ? aws_nat_gateway.data_nat_gw.*.public_ip : null
description = "List of Elastic IP associated to Data NAT gateway(s)"
}
output "pvt_sg" {
value = var.create_sgs ? join(", ", aws_security_group.pvt_sg.*.id) : null
description = "ID of private security group"
}
output "protected_sg" {
value = var.create_sgs ? join(", ", aws_security_group.protected_sg.*.id) : null
description = "ID of security group allowing all communications strictly within the VPC"
}
output "public_web_dmz_sg" {
value = var.create_sgs ? join(", ", aws_security_group.pub_sg.*.id) : null
description = "Security group ID for public facing web servers or load balancer"
}
output "private_web_dmz_sg" {
value = var.create_sgs ? join(", ", aws_security_group.pvt_sg.*.id) : null
description = "Security group ID for internal web/app servers"
}
output "private_zone_id" {
value = var.create_private_zone ? join(", ", aws_route53_zone.private.*.zone_id) : null
description = "Route53 private hosted zone id"
}
output "private_zone_ns" {
value = var.create_private_zone ? aws_route53_zone.private.*.name_servers : null
description = "List of private hosted zone name servers"
}