Created
May 10, 2017 16:13
-
-
Save tombuildsstuff/8f5a20677471b387f63dced51e75fc84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_resource_group" "test" { | |
name = "tharvey-dev7986" | |
location = "West Europe" | |
} | |
resource "azurerm_virtual_network" "test" { | |
name = "tharveydev7986nw" | |
address_space = ["10.0.0.0/16"] | |
resource_group_name = "${azurerm_resource_group.test.name}" | |
location = "${azurerm_resource_group.test.location}" | |
subnet { | |
name = "tharveydev7986sn2" | |
address_prefix = "10.0.3.0/24" | |
} | |
} | |
resource "azurerm_subnet" "first" { | |
name = "tharveydev7986sn1" | |
resource_group_name = "${azurerm_resource_group.test.name}" | |
virtual_network_name = "${azurerm_virtual_network.test.name}" | |
address_prefix = "10.0.2.0/24" | |
} | |
resource "azurerm_subnet" "second" { | |
name = "tharveydev7986sn3" | |
resource_group_name = "${azurerm_resource_group.test.name}" | |
virtual_network_name = "${azurerm_virtual_network.test.name}" | |
address_prefix = "10.0.4.0/24" | |
} | |
resource "azurerm_network_interface" "first" { | |
name = "tharveydev7986ni1" | |
location = "${azurerm_resource_group.test.location}" | |
resource_group_name = "${azurerm_resource_group.test.name}" | |
ip_configuration { | |
name = "testconfiguration1" | |
subnet_id = "${azurerm_subnet.first.id}" | |
private_ip_address_allocation = "dynamic" | |
} | |
tags { | |
environment = "staging" | |
} | |
} | |
resource "azurerm_network_interface" "second" { | |
name = "tharveydev7986ni3" | |
location = "${azurerm_resource_group.test.location}" | |
resource_group_name = "${azurerm_resource_group.test.name}" | |
ip_configuration { | |
name = "testconfiguration1" | |
subnet_id = "${azurerm_subnet.second.id}" | |
private_ip_address_allocation = "dynamic" | |
} | |
tags { | |
environment = "staging" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment