-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplates.tf
28 lines (25 loc) · 1.02 KB
/
templates.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
# Template for initial configuration of StrongSwan
data "template_file" "strongswanipsecconf" {
template = "${file("templates/strongswanipsecconf.tpl")}"
vars = {
strongswanleft = "${azurerm_network_interface.azureonpremstrongswanvmnic.private_ip_address}"
strongswanleftsubnet = "${var.azureonpremvnet_default_subnet}"
strongswanright = "${data.azurerm_public_ip.azurevpnpubip.ip_address}"
strongswanrightsubnet = "${var.azurevpnvnet_default_subnet}"
}
depends_on = [
data.azurerm_public_ip.azurevpnpubip,
]
}
# Template for the shared key configuration of StrongSwan VPN
data "template_file" "strongswanipsecsecrets" {
template = "${file("templates/strongswanipsecsecrets.tpl")}"
vars = {
strongswanlocalip = "${azurerm_network_interface.azureonpremstrongswanvmnic.private_ip_address}"
azurevpngwpublicip = "${data.azurerm_public_ip.azurevpnpubip.ip_address}"
strongswansharedkey = "${var.azurevpn_shared_key}"
}
depends_on = [
data.azurerm_public_ip.azurevpnpubip,
]
}