Not able to identify the case-sensitivity of Azure locations #22536
Labels
Compute
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Mgmt
This issue is related to a management-plane library.
needs-team-attention
This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
This issue is responsible by Azure service team.
Bug Report
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4"
4.2.1
go version go1.21.3 darwin/arm64
What happened?
I am trying to write a function which can list the SKU family based on the instance size and region. The code snippet looks like this
I tried using a filter like this but it doesn't work and still it prints all of the locations. This is given in the documentation example
Weirdly the regions that the above code snippet prints has no common case sensitivity. Check the following output
I also tried to check if the armsubscriptions.Location has some mapping to check the region name printed above to the one it actually displays via
Location.Name
orLocation.DisplayName
. But there isn't.Ultimately how can I know the location name will be lowercase, camelcase or any other. for e.g. when checking central india form the armsubscriptions.Location it gives
centralindia
andCentral India
as thename
andDisplayName
respectively, but in the above output I see that I need to check forCentralIndia
for the amiFamily.What did you expect or want to happen?
I expect a common ground on how can I use the location or atleast some mapping which maps the different cases.
How can we reproduce it?
Execute the above code.
Anything we should know about your environment.
uname -a Darwin ip-192-168-1-3.ec2.internal 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64
The text was updated successfully, but these errors were encountered: