Update: Microsoft will be moving away from UserVoice sites on a product-by-product basis throughout the 2021 calendar year. We will leverage 1st party solutions for customer feedback. Learn more here.

David Darlington

My feedback

  1. 314 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    21 comments  ·  Azure Key Vault » Other  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    David Darlington commented  · 

    I can only have 8 characters to denote application for my terraform modules...

    locals {

    # If the app name has spaces between words, replace those with Dashes
    app_name_dashed = replace(data.azurerm_resource_group.rg.tags.Application, " ", "-")

    # The next line makes sure the app name isnt too long and doesnt end with a -
    # Name need to be betweek 3-24 characters
    # 12345678-centralus-prod # That string is longest I can think of as a possiblity
    kv_name_predicate = replace(substr(local.app_name_dashed, 0, 8), "/-$/", "")
    }

    resource "azurerm_key_vault" "kv" {
    name = "${local.kv_name_predicate}-${data.azurerm_resource_group.rg.tags.environment_tier}-${data.azurerm_resource_group.rg.location}"
    location = data.azurerm_resource_group.rg.location
    resource_group_name = data.azurerm_resource_group.rg.name
    enabled_for_disk_encryption = true
    tenant_id = data.azurerm_client_config.current.tenant_id
    sku_name = "standard"
    }

Feedback and Knowledge Base