-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Ability to inject custom tags #4479
Comments
Do you need those tags apply to each individual resource within that deployment? You'd be great if you could show (in detail) what you do today, just to make sure that whatever we implement addresses that scenario. |
I've been asked to do both before by different people as a way to track costs in Azure subscriptions.
In reality, I'm asked to create tags for a myriad of reasons. In my own AZD templates, I can accomplish it today by manually editing the template and adding more content to the Today, I accomplish this by running this type of command in PowerShell using Azure CLI: az group update --resource-group "<resource-group-name>" --tags "key=value"
foreach ($resource in (az resource list --resource-group "<resource-group-name>" | ConvertFrom-Json)) {
az resource tag --is-incremental --resource-group "<resource-group-name>" --name $resource.name --resource-type $resource.type --tags "key=value"
} In a perfect world, I could have some type of environment file either in the template directory or a parent directory (think like This is SUPER low priority, but I just thought I would put it on your radar since today I'm tagging things manually after running the AZD deployment. Please feel free to push this to the back of your backlog 😄 |
Could this be a potential candidate for an extension @wbreza ? I think something like
azd would provide the library to get the list of resources and apply tags. The only downside would be that calling |
Extensions/plugins would solve this for me. I know that work is planned in #3565 |
Ask
It would be amazing to have a way to set an environment variable in your dev environment with a list of custom tags that you want applied to any AZD deployment. It would be even better if there's a way to do this without modifying existing templates.
Context
It's not uncommon to have requirements on your Azure subscription to tag your deployments with metadata like:
Today, I need to modify any AZD template I pull down to add this functionality.
In a perfect world, I could have either an environment variable or some special *.env file (bonus points for recursive lookup) where I can define custom tags that should be applied to any AZD deployment I create.
Research
I searched the documentation and this repository to see if someone has brought this up before. If I missed another issue, I apologize.
The text was updated successfully, but these errors were encountered: