I'm trying to use File transform task in Azure Pipelines. And I'm providing variables from Azure App Configurations. By using AzureAppConfiguration@2 task to fetch config values dynamically.
According to Azure App Configurations it is recommended/possible to use application, region, etc discriminator key prefixes like:
And in .NET Core these can be removed by using .TrimKeyPrefix(
Is it possible to add a new property which would remove the give prefix form all loaded key? Like this trimKeyPrefix: "WebSite:"
- task: AzureAppConfiguration@2
displayName: 'Get Azure App Configurations'
inputs:
azureSubscription: ''
ConfigstoreName: ''
KeyFilter: 'WebSite:*'
Label: 'Development'
* trimKeyPrefix: "WebSite:"
I have requested this in the "azure-pipelines-tasks" repo. Not sure why is this Task in a different repo?
https://github.com/microsoft/azure-pipelines-tasks/issues/12236#issue-556258774
@Yiming-Jia
@majorimi we will be looking into this. Thanks for the suggestion.
Is there any update on this?
We will add support of this, it's still in the backlog though.
Sounds good. Thank you.
Hello @majorimi,
We just release a AzureDevOps task at version 2.10 for Azure AppConfiguration to support the TrimKeyPrefix.
Thank you very much. I have tried it, works perfectly :)
My problem is that .NET Core and Azure Pipeline not really compatible... Using these variables in .NET Core with separator ':' and replacing in the pipeline with '.' is not possible. Posted this request here, but the other team is not really responsible:
https://github.com/microsoft/azure-pipelines-tasks/issues/12235