-
Notifications
You must be signed in to change notification settings - Fork 2
/
vpc.network-outputs.tf
66 lines (47 loc) · 1.98 KB
/
vpc.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
################ ########################################### ########
################ Module [[[subnets]]] Output Variables List. ########
################ ########################################### ########
### ##################### ###
### [[output]] out_vpc_id ###
### ##################### ###
output out_vpc_id {
description = "This (string) vpc_id is the ID of the VPC that has just been created."
value = aws_vpc.this_vpc.id
}
### ######################### ###
### [[output]] out_subnet_ids ###
### ######################### ###
output out_subnet_ids {
description = "Every subnet ID in every availability zone of this VPC."
value = concat( 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
}