Azure / template-specs

MIT License
31 stars 4 forks source link

Support Tags in PowerShell Commands #38

Closed stweb1963 closed 3 years ago

stweb1963 commented 3 years ago

The templateSpecs resources support Tags but the PowerShell commands do not provide support for or return tag details

Add -Tags to New-AzTemplateSpec

Return Tags when using Get-AzTemplateSpec for both the templateSpec and if specified, versions

alex-frankel commented 3 years ago

Thanks for reporting this. We missed this and plan on implementing it soon. FWIW, our plan is to have tags inherit to a version. So if I do:

New-AzTemplateSpec ... -Version 1.0 -Tag @{Owner="alex"}

There will be an Owner tag on the parent TemplateSpec resource and the child Version resource. Any concerns with that plan?

stweb1963 commented 3 years ago

No issues Will we also have the ability of tags on just the versions so the end result is a merge of parent and version And if the version has the same tag it would win over the parent

stweb1963 commented 3 years ago

I've been considering the child adoption and have 1 possible concern

We put a number of tags on our resources based on our devops deliveries => repo, build, deliveryId, etc Some would be specific to the templateSpec and possibly some specific to the version (i.e. branch name)

If we are creating the initial TS and put tags on it specific to the version then this would imply that all other versions would have these tags

maybe an option for -Tags (target the TS) and -VersionTags (target the version)?

Thoughts?

stuartko commented 3 years ago

The support for this has now been released with v5.2.0

https://github.com/Azure/azure-powershell/releases/tag/v5.2.0-December2020