Skip to content

Instantly share code, notes, and snippets.

@russmckendrick
Created February 9, 2019 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russmckendrick/38d1dd89f9f23b019e0812369c69b71a to your computer and use it in GitHub Desktop.
Save russmckendrick/38d1dd89f9f23b019e0812369c69b71a to your computer and use it in GitHub Desktop.
Terraform Quirks
module "application-rg" {
source = "modules/vnet"
name = "${var.resource_group_name}"
location = "${var.location}"
tags = "${merge(var.default_tags, map("type","resource"))}"
}
module "application-vnet" {
source = "modules/vnet"
resource_group_name = "${module.application-rg.rg_name}"
location = "${var.location}"
tags = "${merge(var.default_tags, map("type","network"))}"
vnet_name = "${module.application-rg.rg_name}-vnet"
address_space = "10.10.0.0/16"
}
resource "azurerm_resource_group" "resource_group" {
name = "${var.resource_group_name}"
location = "${var.location}"
tags = "${var.tags}"
}
variable "name" {
description = "The name of the resource group we want to use"
default = ""
}
variable "location" {
description = "The location/region where we are crrating the resource"
default = ""
}
variable "tags" {
description = "The tags to associate the resource we are creating"
type = "map"
default = {}
}
output "rg_name" {
description = "The name of the newly created resource group"
value = "${azurerm_resource_group.resource_group.name}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment