-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EC-357] - Moved core vpn resources to modular structure (#1102)
- Loading branch information
1 parent
dcd2301
commit c28f3ef
Showing
11 changed files
with
258 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data "azuread_application" "vpn_app" { | ||
display_name = "${var.prefix}-${var.env_short}-app-vpn" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
locals { | ||
nonstandard = { | ||
weu = { | ||
vpn = "${var.project}-vpn" | ||
dns_forwarder_snet = "${var.project}-dnsforwarder" | ||
dns_forwarder = "${var.project}-dns-forwarder" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
variable "project" { | ||
type = string | ||
description = "IO prefix, short environment and short location" | ||
} | ||
|
||
variable "prefix" { | ||
type = string | ||
description = "Prefix for resources" | ||
validation { | ||
condition = ( | ||
length(var.prefix) < 6 | ||
) | ||
error_message = "Max length is 6 chars." | ||
} | ||
} | ||
|
||
variable "env_short" { | ||
type = string | ||
validation { | ||
condition = ( | ||
length(var.env_short) == 1 | ||
) | ||
error_message = "Length must be 1 chars." | ||
} | ||
} | ||
|
||
variable "location" { | ||
type = string | ||
description = "Azure region" | ||
} | ||
|
||
variable "location_short" { | ||
type = string | ||
description = "Azure region short name" | ||
} | ||
|
||
variable "tags" { | ||
type = map(any) | ||
description = "Resource tags" | ||
} | ||
|
||
variable "resource_group_name" { | ||
type = string | ||
description = "Resource group name for VNet" | ||
} | ||
|
||
variable "subscription_current" { | ||
description = "Current subscription information" | ||
} | ||
|
||
## VPN ## | ||
variable "vnet_common" { | ||
type = object({ | ||
id = string | ||
name = string | ||
address_space = list(string) | ||
resource_group_name = string | ||
}) | ||
description = "Information of the common VNet" | ||
} | ||
|
||
variable "vpn_sku" { | ||
type = string | ||
default = "VpnGw1" | ||
description = "VPN Gateway SKU" | ||
} | ||
|
||
variable "vpn_pip_sku" { | ||
type = string | ||
default = "Basic" | ||
description = "VPN GW PIP SKU" | ||
} | ||
|
||
variable "vpn_cidr_subnet" { | ||
type = list(string) | ||
description = "VPN network address space." | ||
} | ||
|
||
variable "dnsforwarder_cidr_subnet" { | ||
type = list(string) | ||
description = "DNS Forwarder network address space." | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { | ||
to = module.vpn_weu.module.dns_forwarder.azurerm_container_group.this | ||
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.ContainerInstance/containerGroups/io-p-dns-forwarder" | ||
} | ||
|
||
import { | ||
to = module.vpn_weu.module.dns_forwarder_snet.azurerm_subnet.this | ||
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-dnsforwarder" | ||
} | ||
|
||
import { | ||
to = module.vpn_weu.module.vpn.azurerm_public_ip.gw[0] | ||
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/publicIPAddresses/io-p-vpn-gw-pip" | ||
} | ||
|
||
import { | ||
to = module.vpn_weu.module.vpn.azurerm_virtual_network_gateway.gw | ||
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworkGateways/io-p-vpn-gw" | ||
} | ||
|
||
import { | ||
to = module.vpn_weu.module.vpn_snet.azurerm_subnet.this | ||
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/GatewaySubnet" | ||
} |
Oops, something went wrong.