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
854 stars 614 forks source link

AzNaming Tool - Option to return also expanded resourceName using API #157

Closed andreabisiach closed 1 year ago

andreabisiach commented 1 year ago

Assume that using API i post a request like:

{
  "resourceEnvironment": "prd",
  "resourceFunction": "func",
  "resourceInstance": "7",
  "resourceLocation": "we",
  "resourceOrg": "so",
  "resourceProjAppSvc": "spa",
  "resourceType": "vmss",
  "resourceUnitDept": "sud",
  "customComponents": {
    "rbacRoles": "ro"
  },
  "resourceId": 87
}

The result would be:

{
    "resourceName": "vmss-sud-spa-func-prd-we-7-ro",
    "message": "",
    "success": true
}

It would be nice to optionally have a response like this:

{
    "resourceName": "vmss-sud-spa-func-prd-we-7-ro",
    "resourceNameExpanded": ["Compute/virtualMachineScaleSets - Linux", "Sample Unit/Dept", "Sample Project/App/Service". "Sample Function", "Production", "West Europe", "7", "Read"]
    "message": "",
    "success": true
}

and/or

{
    "resourceName": "vmss-sud-spa-func-prd-we-7-ro",
    "resourceNameExpanded": {
"resourceType": "Compute/virtualMachineScaleSets - Linux",
"resourceUnitDept" : "Sample Unit/Dept",
"resourceProjAppSvc" : "Sample Project/App/Service",
"resourceFunction" :  "Sample Function",
"resourceEnvironment": "Production",
"resourceLocation": "West Europe",
"resourceInstance": "7",
  "customComponents": {
    "rbacRoles": "Read"
  },
    "message": "",
    "success": true
}
BryanSoltis commented 1 year ago

Hi @andreabisiach,

Thank you for the suggestion! This woudl be a very simple update, seeing how all teh functionality is already there.

image

We will include this update in the next release.

Thank you!

-Bryan

BryanSoltis commented 1 year ago

Hi @andreabisiach ,

I wanted to let you know this feature has been added in the latest release.

https://github.com/microsoft/CloudAdoptionFramework/blob/master/ready/AzNamingTool/RELEASENOTES.md

-Bryan

andreabisiach commented 1 year ago

Thank you @BryanSoltis !