-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsub.network-outputs.tf
52 lines (40 loc) · 1.76 KB
/
sub.network-outputs.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
################ ################################################## ########
################ Module [[[subnet network]]] Output Variables List. ########
################ ################################################## ########
### ######################### ###
### [[output]] out_subnet_ids ###
### ######################### ###
output out_subnet_ids {
description = "Every subnet ID in every availability zone of this VPC."
value = [ aws_subnet.private.*.id, aws_subnet.public.*.id ]
}
### ################################# ###
### [[output]] out_private_subnet_ids ###
### ################################# ###
output out_private_subnet_ids {
description = "The private subnet IDS in every availability zone of this VPC."
value = [ aws_subnet.private.*.id ]
}
### ################################ ###
### [[output]] out_public_subnet_ids ###
### ################################ ###
output out_public_subnet_ids {
description = "The public subnet IDS in every availability zone of this VPC."
value = [ aws_subnet.public.*.id ]
}
/*
| --
| -- IMPORTANT - DO NOT LET TERRAFORM BRING UP EC2 INSTANCES INSIDE PRIVATE
| -- SUBNETS BEFORE (SLOW TO CREATE) NAT GATEWAYS ARE UP AND RUNNING.
| --
| -- Suppose systemd on bootup wants to get a rabbitmq docker image as
| -- specified by a service unit file. Terraform will quickly bring up ec2
| -- instances and then proceed to slowly create NAT gateways. To avoid
| -- these types of bootup errors we must declare explicit dependencies to
| -- delay ec2 creation until the private gateways and routes are ready.
| --
*/
output out_outgoing_routes {
description = "Aids creation of explicit dependency for instances brought up in private subnets."
value = aws_route.private.*.id
}