I have been successfully using this agent task for replacing tokens in my appsettings.json files. However, it's failing when I try using a template with nested objects.
As you can see, only a partial transformation has occurred. Nested object properties (e.g., Path, SubFolder, etc. under StorageContainers and FileExtension, Path under SupportedDocTypes) are being ignored.
Please let me know if you need any further information to investigate this issue.
Hi there,
I have been successfully using this agent task for replacing tokens in my appsettings.json files. However, it's failing when I try using a template with nested objects.
Environment: Azure DevOps
Steps to reproduce: Source Content
"AzureSettings": { "BlobServiceUrl": "your-connection-string", "ResourceGroupName": "your-storage-account-resource-group-name", "ResourceId": "your-client-id", "SubscriptionId": "your-subscription-id", "TenantId": "your-tenant-id", "StorageAccounts": [ { "Name": "your-storage-account-name", "StorageContainers": [ { "Name": "your-storage-container-name", "OutputPath": "your-storage-container-output-path", "Path": "your-storage-container-path", "SubFolder": "your-storage-container-path-subfolder", "SupportedDocTypes": [ { "FileExtension": "file-extension", "Path": "storage-container-path-for-supported-doc-type" } ] } ] } ] }
Generated Output:
"AzureSettings": { "BlobServiceUrl": "__AzureSettings.BlobServiceUrl__", "ResourceGroupName": "__AzureSettings.ResourceGroupName__", "ResourceId": "__AzureSettings.ResourceId__", "SubscriptionId": "__AzureSettings.SubscriptionId__", "TenantId": "__AzureSettings.TenantId__", "StorageAccounts": [ { "Name": "__AzureSettings.StorageAccounts[0].Name__", "StorageContainers": [ { "Name": "__AzureSettings.StorageAccounts[0].Name__", "Path": "your-storage-container-path", "SubFolder": "your-storage-container-path-subfolder", "OutputPath": "your-storage-container-output-path", "SupportedDocTypes": [ { "FileExtension": "file-extension", "Path": "storage-container-path-for-supported-doc-type" } ] } ] } ] }
Expected Output:
"AzureSettings": { "BlobServiceUrl": "__AzureSettings.BlobServiceUrl__", "ResourceGroupName": "__AzureSettings.ResourceGroupName__", "ResourceId": "__AzureSettings.ResourceId__", "SubscriptionId": "__AzureSettings.SubscriptionId__", "TenantId": "__AzureSettings.TenantId__", "StorageAccounts": [ { "Name": "__AzureSettings.StorageAccounts[0].Name__", "StorageContainers": [ { "Name": "__AzureSettings.StorageAccounts[0].StorageContainers[0].Name__", "OutputPath": "__AzureSettings.StorageAccounts[0].StorageContainers[0].OutputPath__", "Path": "__AzureSettings.StorageAccounts[0].StorageContainers[0].Path__", "SubFolder": "__AzureSettings.StorageAccounts[0].StorageContainers[0].SubFolder__", "SupportedDocTypes": [ { "FileExtension": "__AzureSettings.StorageAccounts[0].StorageContainers[0].SupportedDocTypes[0].FileExtension__", "Path": "__AzureSettings.StorageAccounts[0].StorageContainers[0].SupportedDocTypes[0].Path__" }, ... ] } ] } ] }
As you can see, only a partial transformation has occurred. Nested object properties (e.g., Path, SubFolder, etc. under StorageContainers and FileExtension, Path under SupportedDocTypes) are being ignored.
Please let me know if you need any further information to investigate this issue.
Kind regards, Olu...