-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathazurerm_virtual_network_gateway_connection.tf
64 lines (64 loc) · 2.96 KB
/
azurerm_virtual_network_gateway_connection.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
resource "azurerm_virtual_network_gateway_connection" "virtual_network_gateway_cxn_1_tunl_1" {
local_network_gateway_id = azurerm_local_network_gateway.local_network_gtwy_1_tunl_1.id
location = azurerm_resource_group.resource_group.location
name = "virtual_network_gateway_cxn_1_tunl_1"
resource_group_name = azurerm_resource_group.resource_group.name
shared_key = aws_vpn_connection.vpn_connection_1.tunnel1_preshared_key # AWS VPN Connection secret shared key
type = "IPsec"
virtual_network_gateway_id = azurerm_virtual_network_gateway.virtual_network_gateway.id
tags = merge(
module.azure_user_tags.tags,
{
Name = "virtual_network_gateway_cxn_1_tunl_1"
}
)
}
#
resource "azurerm_virtual_network_gateway_connection" "virtual_network_gateway_cxn_1_tunl_2" {
local_network_gateway_id = azurerm_local_network_gateway.local_network_gtwy_1_tunl_2.id
location = azurerm_resource_group.resource_group.location
name = "virtual_network_gateway_cxn_1_tunl_2"
resource_group_name = azurerm_resource_group.resource_group.name
shared_key = aws_vpn_connection.vpn_connection_1.tunnel2_preshared_key
type = "IPsec"
virtual_network_gateway_id = azurerm_virtual_network_gateway.virtual_network_gateway.id
tags = merge(
module.azure_user_tags.tags,
{
Name = "virtual_network_gateway_cxn_1_tunl_2"
}
)
}
#
resource "azurerm_virtual_network_gateway_connection" "virtual_network_gateway_cxn_2_tunl_1" {
local_network_gateway_id = azurerm_local_network_gateway.local_network_gtwy_2_tunl_1.id
location = azurerm_resource_group.resource_group.location
name = "virtual_network_gateway_cxn_2_tunl_1"
resource_group_name = azurerm_resource_group.resource_group.name
shared_key = aws_vpn_connection.vpn_connection_2.tunnel1_preshared_key
type = "IPsec"
virtual_network_gateway_id = azurerm_virtual_network_gateway.virtual_network_gateway.id
tags = merge(
module.azure_user_tags.tags,
{
Name = "virtual_network_gateway_cxn_2_tunl_1"
}
)
}
#
resource "azurerm_virtual_network_gateway_connection" "virtual_network_gateway_cxn_2_tunl_2" {
local_network_gateway_id = azurerm_local_network_gateway.local_network_gtwy_2_tunl_2.id
location = azurerm_resource_group.resource_group.location
name = "virtual_network_gateway_cxn_2_tunl_2"
resource_group_name = azurerm_resource_group.resource_group.name
shared_key = aws_vpn_connection.vpn_connection_2.tunnel2_preshared_key
type = "IPsec"
virtual_network_gateway_id = azurerm_virtual_network_gateway.virtual_network_gateway.id
tags = merge(
module.azure_user_tags.tags,
{
Name = "virtual_network_gateway_cxn_2_tunl_2"
}
)
}
#