I am trying to import App configuration key values using DevOps CICD Pipelines. App configuration had
Private Endpointenabled, disabled public access.private DNS zonecontainsA recordsetof app configuration.(private IP address of azure app config added to private dns zone.)Access keysare toggled off and using managed identity- DevOps: Had set up a self-hosted agent using a virtual machine that belongs to the same
VNETandsubnetas the app configuration private endpoint. - RBAC: Devops service principal has RBAC azure roles
OwnerandAzure App Configuration Data Owner - Subnet has associated with NSG and its rules are shown in snapshot.
- Had enabled
managed identityof app configuration.
az appconfig kv import --profile appconfig/kvset --name <your store name> --source file --path appconfigdata.json --format json
Issue: At first App configuration is public access and used Microsoft Agent pipelines for importing and it was success. Later decided to secure access using private endpoint, So I followed all above steps and ensure everything is aligned correct. Whenever I run the pipeline, I get below issue. I explored a lot on this issue and yet unable to find the root cause.
What am i missing?
ERROR: Cannot find a read write access key for the App Configuration
YAML:
steps:
- task: AzureCLI@2
displayName: 'Azure CLI - Update AppConfig'
inputs:
azureSubscription: 'Test-SPN-NonProd'
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az appconfig kv import -n $(tst-appconfigName) -s file --format json --path ./dev-appconfig.json --profile appconfig/kvset --y
workingDirectory: '$(System.DefaultWorkingDirectory)/AzureFunctionShared/drop/AppConfig'
condition: succeededOrFailed()






