Skip to content

Commit

Permalink
Update azure.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodbu authored Mar 20, 2022
1 parent ef6f2c5 commit d6d6b91
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions azure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ EOF

resource "azurerm_network_interface" "main" {
name = "${var.azure_spoke2_name}-nic1"
resource_group_name = module.azure_spoke_2.vnet.resource_group
resource_group_name = module.azure_spoke_2.vpc.resource_group
location = var.azure_spoke2_region
ip_configuration {
name = module.azure_spoke_2.vnet.private_subnets[0].name
subnet_id = module.azure_spoke_2.vnet.private_subnets[0].subnet_id
name = module.azure_spoke_2.vpc.private_subnets[0].name
subnet_id = module.azure_spoke_2.vpc.private_subnets[0].subnet_id
private_ip_address_allocation = "Dynamic"
}
}

resource "azurerm_network_security_group" "spoke2-app" {
name = "spoke2-app"
resource_group_name = module.azure_spoke_2.vnet.resource_group
resource_group_name = module.azure_spoke_2.vpc.resource_group
location = var.azure_spoke2_region
}

Expand All @@ -41,7 +41,7 @@ resource "azurerm_network_security_rule" "http" {
source_address_prefix = "*"
destination_port_range = "80"
destination_address_prefix = "*"
resource_group_name = module.azure_spoke_2.vnet.resource_group
resource_group_name = module.azure_spoke_2.vpc.resource_group
network_security_group_name = azurerm_network_security_group.spoke2-app.name
}

Expand All @@ -55,7 +55,7 @@ resource "azurerm_network_security_rule" "ssh" {
source_address_prefix = "*"
destination_port_range = "22"
destination_address_prefix = "*"
resource_group_name = module.azure_spoke_2.vnet.resource_group
resource_group_name = module.azure_spoke_2.vpc.resource_group
network_security_group_name = azurerm_network_security_group.spoke2-app.name
}

Expand All @@ -69,7 +69,7 @@ resource "azurerm_network_security_rule" "icmp" {
source_address_prefix = "*"
destination_port_range = "*"
destination_address_prefix = "*"
resource_group_name = module.azure_spoke_2.vnet.resource_group
resource_group_name = module.azure_spoke_2.vpc.resource_group
network_security_group_name = azurerm_network_security_group.spoke2-app.name
}

Expand All @@ -80,7 +80,7 @@ resource "azurerm_network_interface_security_group_association" "main" {

resource "azurerm_linux_virtual_machine" "azure_spoke2_vm" {
name = "${var.azure_spoke2_name}-app"
resource_group_name = module.azure_spoke_2.vnet.resource_group
resource_group_name = module.azure_spoke_2.vpc.resource_group
location = var.azure_spoke2_region
size = var.azure_test_instance_size
admin_username = "ubuntu"
Expand Down Expand Up @@ -109,4 +109,4 @@ resource "azurerm_linux_virtual_machine" "azure_spoke2_vm" {

output "azure_spoke2_app_private_ip" {
value = azurerm_linux_virtual_machine.azure_spoke2_vm.private_ip_address
}
}

0 comments on commit d6d6b91

Please sign in to comment.