Skip to content

Commit 81e8cbb

Browse files
committed
Adding subnet_name
1 parent 20d0f66 commit 81e8cbb

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

application_gateway/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resource "azurerm_application_gateway" "gw" {
2323

2424
gateway_ip_configuration {
2525
name = "ip-configuration"
26-
subnet_id = "${var.vnet_id}/subnets/${var.subnet_name}"
26+
subnet_id = "${var.vnet_id}/subnets/${var.waf_configuration_map["subnet_name"]}"
2727
}
2828

2929
waf_configuration {

application_gateway/variables.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ variable "vnet_id" {
1313

1414
}
1515

16-
variable "subnet_name" {
17-
18-
}
1916

2017
variable "prefix" {
2118

bastion/variables.tf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ variable "vm_size" {
1010

1111
}
1212

13-
variable "subnets_map" {
14-
description = "Map of the subnet to deploy the bastion server"
15-
type = "map"
16-
}
17-
18-
variable "subnet_name" {
19-
description = "Name of the subnet to deploy the bastion server"
13+
variable "subnet_id" {
14+
description = "ID of the subnet to deploy the bastion server"
2015
}
2116

2217

bastion/vm_bastion.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resource "azurerm_network_interface" "bastion" {
3636

3737
ip_configuration {
3838
name = "${var.computer_name}-ipconfig"
39-
subnet_id = "${var.subnets_map["${var.subnet_name}"]}"
39+
subnet_id = "${var.subnet_id}"
4040

4141
private_ip_address_allocation = "dynamic"
4242
public_ip_address_id = "${azurerm_public_ip.bastion_pip.id}"

0 commit comments

Comments
 (0)