Skip to content

Commit

Permalink
Adding subnet_name
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentLesle committed May 11, 2019
1 parent 20d0f66 commit 81e8cbb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion application_gateway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "azurerm_application_gateway" "gw" {

gateway_ip_configuration {
name = "ip-configuration"
subnet_id = "${var.vnet_id}/subnets/${var.subnet_name}"
subnet_id = "${var.vnet_id}/subnets/${var.waf_configuration_map["subnet_name"]}"
}

waf_configuration {
Expand Down
3 changes: 0 additions & 3 deletions application_gateway/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ variable "vnet_id" {

}

variable "subnet_name" {

}

variable "prefix" {

Expand Down
9 changes: 2 additions & 7 deletions bastion/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ variable "vm_size" {

}

variable "subnets_map" {
description = "Map of the subnet to deploy the bastion server"
type = "map"
}

variable "subnet_name" {
description = "Name of the subnet to deploy the bastion server"
variable "subnet_id" {
description = "ID of the subnet to deploy the bastion server"
}


Expand Down
2 changes: 1 addition & 1 deletion bastion/vm_bastion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "azurerm_network_interface" "bastion" {

ip_configuration {
name = "${var.computer_name}-ipconfig"
subnet_id = "${var.subnets_map["${var.subnet_name}"]}"
subnet_id = "${var.subnet_id}"

private_ip_address_allocation = "dynamic"
public_ip_address_id = "${azurerm_public_ip.bastion_pip.id}"
Expand Down

0 comments on commit 81e8cbb

Please sign in to comment.