Skip to content

Instantly share code, notes, and snippets.

@dustindortch
Created February 8, 2024 18:20
Show Gist options
  • Save dustindortch/d9bc67101f9676870e405f0e11d268df to your computer and use it in GitHub Desktop.
Save dustindortch/d9bc67101f9676870e405f0e11d268df to your computer and use it in GitHub Desktop.
Terraform Best Practices: Do Not Hard Code Values - No References
variable "address_space" {
default = ["10.0.42.0/24"]
description = "Virtual Network address space"
type = list(string)
}
variable "virtual_network_name" {
default = "vnet-eus-test-myvnet"
description = "Virtual Network name for deployment"
type = string
}
resource "azurerm_virtual_network" "vnet" {
name = var.virtual_network_name
address_space = var.address_space
location = var.location
resource_group_name = var.resource_group_name
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment