I have an Azure DevOps Pipeline below:
...
steps:
- task: AzureAppServiceSettings@1
displayName: 'Update App Service app settings'
inputs:
azureSubscription: ${{parameters.azureSubscription}}
appName: ${{parameters.appName}}
resourceGroupName: ${{parameters.resourceGroupName}}
slotName: ${{parameters.slotName}}
appSettings: |
[
{
"name": "${{parameters.settingName}}",
"value": "${{parameters.buildNumber}}",
"slotSetting": false
}
]
...
When running my pipeline, I'm getting the error:
##[error]Error: Failed to update App service 'my-application-blue' application settings. Error: Conflict - Parameter with name Version already exists. (CODE: 409)
The parameter Version
indeed already exists on my app configuration, but what's odd is that I have the same parameter on other apps, and the same step runs fine on those apps.
All I could find when researching, was that another deployment could be ongoing, but that's not the case, I restarted the app and retried the step and the same error persists.
How can it fix it or find the issue?
The issue was happening because a config key with value VERSION
already existed.
My guess is when the task is deciding whether to create or update a value, it doesn't find an existing key, but trying to add the same key under a different casing causes the issue.
Updating the existing key from VERSION
to Version
fixed the issue and the step executed normally.