update code

This commit is contained in:
neil-yechenwei
2023-11-20 10:19:09 +08:00
committed by zjhe
parent 4f8c8ff7b2
commit 3eeb5995c6
4 changed files with 86 additions and 60 deletions

View File

@ -1,5 +1,11 @@
resource "random_string" "kv_name_prefix" {
length = 21
special = false
numeric = false
}
resource "azurerm_key_vault" "cluster" {
name = "${var.dns_prefix}-${substr(var.name, 0, 12)}-${var.environment_short}-kv"
name = "${random_string.kv_name_prefix.result}-kv"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
tenant_id = data.azurerm_client_config.current.tenant_id