Skip to content

Commit

Permalink
Merge pull request openshift#1 from sdowsland/sdowsland-patch-1
Browse files Browse the repository at this point in the history
Add network interface and security group association
  • Loading branch information
sdowsland authored Feb 24, 2020
2 parents 6d87e7a + fc5f56c commit a33624b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/virtual-machines/linux/public-ip/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ resource "azurerm_network_interface" "internal" {
name = "${var.prefix}-nic2"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
network_security_group_id = azurerm_network_security_group.webserver.id

ip_configuration {
name = "internal"
Expand All @@ -71,6 +70,11 @@ resource "azurerm_network_security_group" "webserver" {
}
}

resource "azurerm_network_interface_security_group_association" "main" {
network_interface_id = azurerm_network_interface.internal.id
network_security_group_id = azurerm_network_security_group.webserver.id
}

resource "azurerm_linux_virtual_machine" "main" {
name = "${var.prefix}-vm"
resource_group_name = azurerm_resource_group.main.name
Expand Down

0 comments on commit a33624b

Please sign in to comment.