Slash character in the name of App Configuration key

Filip Kubiš 1 Reputation point
2021-11-25T09:17:40.387+00:00

Hi,

I am currently trying to define a keyvalue pair in my App configuration resource via a bicep template. However, the template does not allow me to use the slash '/' character in the name of the key. For Spring Boot applications, the default key filter when using App Configuration resource is '/application/*' (see spring-cloud-starter-appconfiguration-config-readme) so the convention would be to prefix the key name with '/application/'. Is there a way to achieve such naming convention using bicep, or do I have to set the values via CLI/Powershell?

Thank you!

To replicate:

resource searchKeyConfiguration 'Microsoft.AppConfiguration/configurationStores/keyValues@2021-03-01-preview' = {     
  name: '/application/some.config.value' // this causes an error     
  parent: appConfigServer     
  properties: {     
    contentType: 'application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8'     
    value: '{"uri": "${vaultUri}secrets/somesecret"}'     
  }     
}     
Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
206 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,411 Reputation points
    2021-11-29T17:30:43.587+00:00

    @Filip Kubiš ,

    Thanks for reaching out to Q&A.

    You are experiencing this error because the key must be encoded as described in this document. URL encoding, allows keys or labels to include characters that are not allowed in ARM template resource names.

    I hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments