🐛 Problem
When cost management tag inheritance is enabled, billed resources inherit tags from resource groups and/or subscriptions in a case sensitive manner. For example, tag 'App' in the resource is different from tag 'app' in the resource group. Billing events for that resource thus include both tags name/value pairs.
The Recommend-StorageAccountOptimizationsToBlobStorage runbook does a JSON conversion (ConvertFrom-Json, in PS 5.1) of the tags property generated by the recommendations results, which throws an error, because of duplicate keys (PS is case-insensitive).
👣 Repro steps
- Enable Cost Management tag inheritance
- Add a storage account tag, e.g., 'environment'='prd'
- Add to the storage account's resource group a similar tag in uppercase, e.g., 'ENVIRONMENT'='prd'
- Create the conditions for the generation of a cost recommendation for that storage account, for example, letting it grow in size for several weeks in a row
- See
Recommend-StorageAccountOptimizationsToBlobStorage runbook throwing exception.
🤔 Expected
The Recommend-StorageAccountOptimizationsToBlobStorage should deal with tag duplicates before trying to convert it to JSON in PowerShell.
🙋♀️ Ask for the community
We could use your help:
- Please vote this issue up (👍) to prioritize it.
- Leave comments to help us solidify the vision.
🐛 Problem
When cost management tag inheritance is enabled, billed resources inherit tags from resource groups and/or subscriptions in a case sensitive manner. For example, tag 'App' in the resource is different from tag 'app' in the resource group. Billing events for that resource thus include both tags name/value pairs.
The
Recommend-StorageAccountOptimizationsToBlobStoragerunbook does a JSON conversion (ConvertFrom-Json, in PS 5.1) of the tags property generated by the recommendations results, which throws an error, because of duplicate keys (PS is case-insensitive).👣 Repro steps
Recommend-StorageAccountOptimizationsToBlobStoragerunbook throwing exception.🤔 Expected
The
Recommend-StorageAccountOptimizationsToBlobStorageshould deal with tag duplicates before trying to convert it to JSON in PowerShell.🙋♀️ Ask for the community
We could use your help: