Last active
October 24, 2019 17:28
-
-
Save yohanb/680b77d3becd3a089454affddbc997a1 to your computer and use it in GitHub Desktop.
Simple example of resource group naming.
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
locals { | |
org = "acme" | |
prj = "rockets" | |
env = "staging" | |
suffix = "01234" | |
} | |
resource "azurerm_resource_group" "example" { | |
name = # Value on next line for readability | |
regex("^[-\\w\\._\\(\\)]+$",substr("rg-${local.org}-${local.prj}-${local.env}-main-${local.suffix}", 90)) | |
location = "eastus" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment