forked from terraform-aws-modules/terraform-aws-vpn-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
135 lines (125 loc) · 4.7 KB
/
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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
output "vpn_connection_id" {
description = "A list with the VPN Connection ID if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.id,
aws_vpn_connection.tunnel.*.id,
aws_vpn_connection.preshared.*.id,
aws_vpn_connection.tunnel_preshared.*.id,
[""],
),
0,
)
}
output "vpn_connection_tunnel1_address" {
description = "A list with the the public IP address of the first VPN tunnel if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.tunnel1_address,
aws_vpn_connection.tunnel.*.tunnel1_address,
aws_vpn_connection.preshared.*.tunnel1_address,
aws_vpn_connection.tunnel_preshared.*.tunnel1_address,
[""],
),
0,
)
}
output "vpn_connection_tunnel1_cgw_inside_address" {
description = "A list with the the RFC 6890 link-local address of the first VPN tunnel (Customer Gateway Side) if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.tunnel1_cgw_inside_address,
aws_vpn_connection.tunnel.*.tunnel1_cgw_inside_address,
aws_vpn_connection.preshared.*.tunnel1_cgw_inside_address,
aws_vpn_connection.tunnel_preshared.*.tunnel1_cgw_inside_address,
[""],
),
0,
)
}
output "vpn_connection_tunnel1_vgw_inside_address" {
description = "A list with the the RFC 6890 link-local address of the first VPN tunnel (VPN Gateway Side) if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.tunnel1_vgw_inside_address,
aws_vpn_connection.tunnel.*.tunnel1_vgw_inside_address,
aws_vpn_connection.preshared.*.tunnel1_vgw_inside_address,
aws_vpn_connection.tunnel_preshared.*.tunnel1_vgw_inside_address,
[""],
),
0,
)
}
output "vpn_connection_tunnel2_address" {
description = "A list with the the public IP address of the second VPN tunnel if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.tunnel2_address,
aws_vpn_connection.tunnel.*.tunnel2_address,
aws_vpn_connection.preshared.*.tunnel2_address,
aws_vpn_connection.tunnel_preshared.*.tunnel2_address,
[""],
),
0,
)
}
output "vpn_connection_tunnel2_cgw_inside_address" {
description = "A list with the the RFC 6890 link-local address of the second VPN tunnel (Customer Gateway Side) if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.tunnel2_cgw_inside_address,
aws_vpn_connection.tunnel.*.tunnel2_cgw_inside_address,
aws_vpn_connection.preshared.*.tunnel2_cgw_inside_address,
aws_vpn_connection.tunnel_preshared.*.tunnel2_cgw_inside_address,
[""],
),
0,
)
}
output "vpn_connection_tunnel2_vgw_inside_address" {
description = "A list with the the RFC 6890 link-local address of the second VPN tunnel (VPN Gateway Side) if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.tunnel2_vgw_inside_address,
aws_vpn_connection.tunnel.*.tunnel2_vgw_inside_address,
aws_vpn_connection.preshared.*.tunnel2_vgw_inside_address,
aws_vpn_connection.tunnel_preshared.*.tunnel2_vgw_inside_address,
[""],
),
0,
)
}
output "vpn_connection_transit_gateway_attachment_id" {
description = "The transit gateway attachment ID that was generated when attaching this VPN connection."
value = element(
concat(
aws_vpn_connection.default.*.transit_gateway_attachment_id,
aws_vpn_connection.tunnel.*.transit_gateway_attachment_id,
aws_vpn_connection.preshared.*.transit_gateway_attachment_id,
aws_vpn_connection.tunnel_preshared.*.transit_gateway_attachment_id,
[""],
),
0,
)
}
output "vpn_connection_customer_gateway_configuration" {
description = "The configuration information for the VPN connection's customer gateway (in the native XML format) if `create_vpn_connection = true`, or empty otherwise"
value = element(
concat(
aws_vpn_connection.default.*.customer_gateway_configuration,
aws_vpn_connection.tunnel.*.customer_gateway_configuration,
aws_vpn_connection.preshared.*.customer_gateway_configuration,
aws_vpn_connection.tunnel_preshared.*.customer_gateway_configuration,
[""],
),
0,
)
}
output "tunnel1_preshared_key" {
description = "The preshared key of the first VPN tunnel."
value = var.tunnel1_preshared_key
}
output "tunnel2_preshared_key" {
description = "The preshared key of the second VPN tunnel."
value = var.tunnel2_preshared_key
}