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
I got the solution. For a dotnet application to read from Azure key vault, I would require to add secret names as
This double hyphen in terraform specifies that the secret represents the configuration section.
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-
.