I am trying to use resource appsettingswebsite 'Microsoft.Web/sites/config@2022-03-01'
to configure the values in azure for my app service. Now in azure i have values like
FeatureFlags:featureFlag1: true
FeatureFlags:featureFlag2: false
FeatureFlags:featureFlag3: true
But in Bicep, I am not able to put colons in names of the properties of above resource. I tried escaping the colon character but was not successful. I tried placing the the above as json object in bicep file like
FeatureFlags:
{
featureFlag1: true
featureFlag2: false
featureFlag3: true
}
But that results into error Status Message: The parameter properties has an invalid value. (Code: BadRequest)
Can we put the objects in configuration of app service anyway?
Help will be appreciated, thanks.
CodePudding user response:
You just need to use quotes (string literals):
resource appSettings 'Microsoft.Web/sites/config@2022-03-01' = {
...
properties: {
'FeatureFlags:featureFlag1': true
'FeatureFlags:featureFlag2': false
'FeatureFlags:featureFlag3': true
}
}