Skip to content

Commit

Permalink
random keyvault name
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmusa committed May 19, 2021
1 parent 6acddc9 commit f934009
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/jumpbox/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

resource "random_id" "jumpbox-keyvault" {
byte_length = 12
}

resource "azurerm_key_vault" "jumpbox-keyvault" {
name = var.keyvault_name
name = format("%.24s", lower(replace("${var.keyvault_name}${random_id.jumpbox-keyvault.id}", "/[[:^alnum:]]/", "")))
location = var.location
resource_group_name = var.resource_group_name
tenant_id = var.tenant_id
Expand Down

0 comments on commit f934009

Please sign in to comment.