add random suffix to resource group name

This commit is contained in:
zjhe
2024-10-05 10:43:31 +08:00
committed by lonegunmanb
parent 181b34291c
commit 7c6d6f9438
6 changed files with 12 additions and 6 deletions

View File

@ -4,8 +4,14 @@ locals {
hub-nva-resource-group = "hub-nva-rg"
}
resource "random_string" "suffix" {
length = 5
special = false
upper = false
}
resource "azurerm_resource_group" "hub-nva-rg" {
name = "${local.prefix-hub-nva}-rg"
name = "${local.prefix-hub-nva}-rg-${random_string.suffix.result}"
location = local.hub-nva-location
tags = {