forked from terraform-aws-modules/terraform-aws-vpn-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
112 lines (102 loc) · 4.79 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
output "vpn_connection_id" {
description = "A list with the VPN Connection ID if `create_vpn_connection = true`, or empty otherwise"
value = try(
aws_vpn_connection.default[0].id,
aws_vpn_connection.tunnel[0].id,
aws_vpn_connection.preshared[0].id,
aws_vpn_connection.tunnel_preshared[0].id,
"")
}
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 = try(
aws_vpn_connection.default[0].tunnel1_address,
aws_vpn_connection.tunnel[0].tunnel1_address,
aws_vpn_connection.preshared[0].tunnel1_address,
aws_vpn_connection.tunnel_preshared[0].tunnel1_address,
"")
}
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 = try(
aws_vpn_connection.default[0].tunnel1_cgw_inside_address,
aws_vpn_connection.tunnel[0].tunnel1_cgw_inside_address,
aws_vpn_connection.preshared[0].tunnel1_cgw_inside_address,
aws_vpn_connection.tunnel_preshared[0].tunnel1_cgw_inside_address,
"")
}
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 = try(
aws_vpn_connection.default[0].tunnel1_vgw_inside_address,
aws_vpn_connection.tunnel[0].tunnel1_vgw_inside_address,
aws_vpn_connection.preshared[0].tunnel1_vgw_inside_address,
aws_vpn_connection.tunnel_preshared[0].tunnel1_vgw_inside_address,
"")
}
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 = try(
aws_vpn_connection.default[0].tunnel2_address,
aws_vpn_connection.tunnel[0].tunnel2_address,
aws_vpn_connection.preshared[0].tunnel2_address,
aws_vpn_connection.tunnel_preshared[0].tunnel2_address,
"")
}
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 = try(
aws_vpn_connection.default[0].tunnel2_cgw_inside_address,
aws_vpn_connection.tunnel[0].tunnel2_cgw_inside_address,
aws_vpn_connection.preshared[0].tunnel2_cgw_inside_address,
aws_vpn_connection.tunnel_preshared[0].tunnel2_cgw_inside_address,
"")
}
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 = try(
aws_vpn_connection.default[0].tunnel2_vgw_inside_address,
aws_vpn_connection.tunnel[0].tunnel2_vgw_inside_address,
aws_vpn_connection.preshared[0].tunnel2_vgw_inside_address,
aws_vpn_connection.tunnel_preshared[0].tunnel2_vgw_inside_address,
"")
}
output "vpn_connection_transit_gateway_attachment_id" {
description = "The transit gateway attachment ID that was generated when attaching this VPN connection."
value = try(
aws_vpn_connection.default[0].transit_gateway_attachment_id,
aws_vpn_connection.tunnel[0].transit_gateway_attachment_id,
aws_vpn_connection.preshared[0].transit_gateway_attachment_id,
aws_vpn_connection.tunnel_preshared[0].transit_gateway_attachment_id,
"")
}
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 = try(
aws_vpn_connection.default[0].customer_gateway_configuration,
aws_vpn_connection.tunnel[0].customer_gateway_configuration,
aws_vpn_connection.preshared[0].customer_gateway_configuration,
aws_vpn_connection.tunnel_preshared[0].customer_gateway_configuration,
"")
sensitive = true
}
output "tunnel1_preshared_key" {
description = "The preshared key of the first VPN tunnel."
value = try(
aws_vpn_connection.default[0].tunnel1_preshared_key,
aws_vpn_connection.preshared[0].tunnel1_preshared_key,
aws_vpn_connection.tunnel[0].tunnel1_preshared_key,
aws_vpn_connection.tunnel_preshared[0].tunnel1_preshared_key,
"")
sensitive = true
}
output "tunnel2_preshared_key" {
description = "The preshared key of the second VPN tunnel."
value = try(
aws_vpn_connection.default[0].tunnel2_preshared_key,
aws_vpn_connection.preshared[0].tunnel2_preshared_key,
aws_vpn_connection.tunnel[0].tunnel2_preshared_key,
aws_vpn_connection.tunnel_preshared[0].tunnel2_preshared_key,
"")
sensitive = true
}