Created
February 9, 2019 17:41
-
-
Save russmckendrick/38d1dd89f9f23b019e0812369c69b71a to your computer and use it in GitHub Desktop.
Terraform Quirks
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
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" | |
} |
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" "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