Created
November 9, 2020 23:51
-
-
Save jesseloudon/fe40a89b0ea18dbc1707172cbaea96c7 to your computer and use it in GitHub Desktop.
ansible on azure part 2
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
variable "vnetName" { | |
type = string | |
description = "virtual network name w/ technician's initials as a suffix" | |
default = "ansibledev-yourinitials" | |
} | |
variable "vnetAddressSpace" { | |
type = list | |
description = "virtual network address space" | |
default = ["10.0.0.0/24"] | |
} | |
variable "vnetSubnetName" { | |
type = string | |
description = "virtual network default subnet name" | |
default = "default" | |
} | |
variable "vnetSubnetAddress" { | |
type = string | |
description = "virtual network default subnet" | |
default = "10.0.0.0/24" | |
} | |
resource "azurerm_virtual_network" "vnet1" { | |
name = var.vnetName | |
address_space = var.vnetAddressSpace | |
location = azurerm_resource_group.rg1.location | |
resource_group_name = azurerm_resource_group.rg1.name | |
subnet { | |
name = var.vnetSubnetName | |
address_prefix = var.vnetSubnetAddress | |
security_group = azurerm_network_security_group.subnet1nsg1.id | |
} | |
} | |
output "azurerm_virtual_network_name" { | |
value = azurerm_virtual_network.vnet1.name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment