microsoft / CloudAdoptionFramework

Code samples and extended documentation to support the guidance provided in the Microsoft Cloud Adoption Framework
https://aka.ms/CAF
Creative Commons Attribution 4.0 International
864 stars 621 forks source link

AzNamingTool - New Feature Request - Add option to include Tag name and Value #133

Closed tarunchy closed 1 year ago

tarunchy commented 1 year ago

Hello,

Thank you for creating this great useful tool. I think we can enhance this tool further by include option add list of tag name and value while generating the names. In Azure there limitation on number of tags we can associate to a resource based on resource type. So including that while generating name and keeping link between resource name and tag will be great addition. I think we various configurable components we can just one more for tags. When we hit generate button we can have check-box to include tag or site level we can option to enforce tags.

-Tarun

BryanSoltis commented 1 year ago

Hi Tarun,

Thank you for the suggestion. At this time, the tool only focuses on defining / managing a naming convention for Azure resources, not tag management. This is better managed within the Azure portal using Azure Policy.

https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-policies

Thank you! -Bryan

tarunchy commented 1 year ago

Hi Bryan,

Yes we have Azure Policy. However think of this situation. A DevOps engineer writing a Terraform code to create a resource Group in Azure with following code:

resource "azurerm_resource_group" "main_rg" { name = var.name location = var.location

tags = var.tags }

Now the value of name we can pass dynamically using the tool or we can validate using the tool's Rest API call. Similarly the tag value also we can pass via this tool. So before we create a resource in azure via automation we can plug-in this tool as Rest API call. I know its not focus right now which is fine. However do you see value of this idea as both name and tag will be used for resource Identification, analytics and this information if we can pass via webhook to downstream system like CMDB can help a lot.

BryanSoltis commented 1 year ago

This issue has been added to our backlog and will be considered for a future update.