Created
August 7, 2019 13:19
-
-
Save rohrerb/4490f3a63baab12fa6f428646128260e to your computer and use it in GitHub Desktop.
Simple resource group module.
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 "rgs" { | |
source = "./modules/resource_group" | |
names = ["rg-0","rg-1","rg-2"] | |
azure_location = "eastus" | |
} |
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 "names" { | |
description = "List of resource groups to create" | |
type = "list" | |
} | |
variable "azure_location" { | |
description = "Location in which to deploy resources" | |
} | |
resource "azurerm_resource_group" "rg" { | |
count = "${length(var.names)}" | |
name = "${var.names[count.index]}" | |
location = "${var.azure_location}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment