Open SCuffy opened 8 months ago
Were there some additional resource types in addition to the RG and the resources in the template? (Maybe via the scripts) I'm sure our tagging policies picked up more, and I made an exclusion on the RG to cover it. I made the RG in advance.
Deployment creates: Data factory (tagged) Managed Identity x2 (tagged) Key vault (tagged) Storage account (tagged) Event grid system topic (NOT tagged) Deployment scripts (only deleteOldResources does not inherit custom tags)
And my new RG doesn't get tagged.
FYI - I'll add this to the 0.2.1 release in hopes that it can be a quick change. I may need to push it to 0.3 since I don't want to delay 0.2.1 given the bug in 0.2. Here's to a productive weekend... 🤞
📝 Scenario
The Deploy to Azure button for FinOps Hubs presents the Azure portal tab to set Tags, but these only get applied to the Resources, not the Resource Group, even if you create a new RG as part of the deployment.
💎 Solution
Add a step to retrofit the tags to the RG too (new or existing), after it has been created.
ℹ️ Additional context
In order to do this, we'll need to update the following:
src/templates/finops-hub/createUiDefinition.json
src/templates/finops-hub/modules/hub.bicep
, create a new deployment script that tags the resource groupsrc/templates/finops-hub/modules/scripts/Tag-ResourceGroup.ps1
docs/finops-hub/template.md
file:tagsByResource
variable.tagsByResource
parameter to the Parameters section? Get the description from hub.bicep.docs/changelog.md
To test, run the local deployment script from PowerShell:
🙋♀️ Ask for the community
We could use your help: