Skip to content

Commit

Permalink
Merge pull request #24 from PhilippKorth/empty_bastion_ressource
Browse files Browse the repository at this point in the history
Changes bastion ressource group creation
  • Loading branch information
mytracks authored Oct 26, 2021
2 parents 493be80 + 86700e3 commit 6f33d1f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bastion.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
resource "azurerm_resource_group" "bastion" {
count = var.licenseServer ? 1 : 0
name = "${var.infrastructurename}-bastion"
location = var.location

Expand All @@ -12,6 +13,7 @@ resource "azurerm_resource_group" "bastion" {
}

resource "azurerm_subnet" "bastion-subnet" {
count = var.licenseServer ? 1 : 0
name = "AzureBastionSubnet"
resource_group_name = azurerm_resource_group.network.name
virtual_network_name = azurerm_virtual_network.simphera-vnet.name
Expand All @@ -22,7 +24,7 @@ resource "azurerm_public_ip" "bastion-pubip" {
count = var.licenseServer ? 1 : 0
name = "bastion-pubip"
location = var.location
resource_group_name = azurerm_resource_group.bastion.name
resource_group_name = azurerm_resource_group.bastion.0.name
allocation_method = "Static"
sku = "Standard"

Expand All @@ -39,11 +41,11 @@ resource "azurerm_bastion_host" "bastion-host" {
count = var.licenseServer ? 1 : 0
name = "bastion-host"
location = var.location
resource_group_name = azurerm_resource_group.bastion.name
resource_group_name = azurerm_resource_group.bastion.0.name

ip_configuration {
name = "configuration"
subnet_id = azurerm_subnet.bastion-subnet.id
subnet_id = azurerm_subnet.bastion-subnet.0.id
public_ip_address_id = azurerm_public_ip.bastion-pubip.0.id
}

Expand Down

0 comments on commit 6f33d1f

Please sign in to comment.