Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 24b27ce

Browse files
authored
Merge pull request #36 from kuhlman-labs/develop
bug fix
2 parents c92a385 + 59371ca commit 24b27ce

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

modules/bastion/main.tf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ module "public_ip" {
2323
}
2424

2525
module "bastion" {
26-
source = "../../resources/network/bastion_host"
27-
resource_group = module.resource_group.name
28-
region = module.resource_group.location
29-
address_prefix_bastion = var.address_prefix_bastion
30-
environment = var.environment
31-
virtual_network_name = var.virtual_network_name
32-
public_ip_address_id = module.public_ip.id
26+
source = "../../resources/network/bastion_host"
27+
resource_group = module.resource_group.name
28+
region = module.resource_group.location
29+
address_prefix_bastion = var.address_prefix_bastion
30+
environment = var.environment
31+
virtual_network_name = var.virtual_network_name
32+
virtual_network_resource_group = var.virtual_network_resource_group
33+
public_ip_address_id = module.public_ip.id
3334
}

resources/network/bastion_host/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
resource "azurerm_subnet" "base" {
66
name = "AzureBastionSubnet"
7-
resource_group_name = var.resource_group
7+
resource_group_name = var.virtual_network_resource_group
88
virtual_network_name = var.virtual_network_name
99
address_prefixes = var.address_prefix_bastion
1010
}

resources/network/bastion_host/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ variable "virtual_network_name" {
3434
type = string
3535
}
3636

37+
variable "virtual_network_resource_group" {
38+
description = "(Required) The name of the virtual network resource group which to attach the subnet. Changing this forces a new resource to be created."
39+
type = string
40+
}
41+
3742
variable "address_prefix_bastion" {
3843
description = "(Required) The address prefixes to use for the bastion subnet."
3944
type = list

0 commit comments

Comments
 (0)