skip to Main Content
resource "azurerm_key_vault_secret" "secret001" {
name         = "VccbSettingsV2__EndpointUrl"
value        = "https://some-url.com"
key_vault_id = azurerm_key_vault.kv.id
}

I get the error when using terraform plan that name cannot contain underscore , perhaps it allows dashes in names but that won’t resolve to VccbSettingsV2:EndpointUrl for a dotnet application.

2

Answers


  1. Chosen as BEST ANSWER

    I got the solution. For a dotnet application to read from Azure key vault, I would require to add secret names as

    VccbSettingsV2--EndpointUrl

    This double hyphen in terraform specifies that the secret represents the configuration section.


  2. You can’t use underscores in Azure Key Vault secret names.

    As per Object Identifiers, secret names must be a 1-127 character string, starting with a letter and containing only 0-9, a-z, A-Z, and -.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search