Skip to content
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

Dedicated Host Group: ResourceGroup name has wrong case #8068

Closed
magodo opened this issue Jan 4, 2020 · 5 comments
Closed

Dedicated Host Group: ResourceGroup name has wrong case #8068

magodo opened this issue Jan 4, 2020 · 5 comments
Assignees
Labels
Compute Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@magodo
Copy link
Contributor

magodo commented Jan 4, 2020

While working on a new terraform resource for a Dedicated Host Group ( hashicorp/terraform-provider-azurerm#5048 ) I stumbled across an issue with upper case resource group names.

Step to reproduce:

  • create a resource group named magodo-rg
  • create a dedicated host group in this resource group

API request: https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/magodo-rg/providers/Microsoft.Compute/hostGroups/magodo_host_group?api-version=2019-03-01

The API response for the dedicated host group resource is like:

{
  "name": "magodo_host_group",
  "id": "/subscriptions/{{subscriptionId}}/resourceGroups/MAGODO-RG/providers/Microsoft.Compute/hostGroups/magodo_host_group",
  "location": "eastus2",
  "properties": {
    "platformFaultDomainCount": 1
  }
}

The problem is that the resource group is uppercased in the id attribute.

Expected Behaviour:

Having an id with resource group name magodo-rg.
This is the behaviour when creating most other resources in azure.

@triage-new-issues triage-new-issues bot removed the triage label Jan 6, 2020
@ArcturusZhang ArcturusZhang added Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team. triage labels Jan 6, 2020
@triage-new-issues triage-new-issues bot removed the triage label Jan 6, 2020
@Drewm3
Copy link
Member

Drewm3 commented Jan 15, 2020

This is by design in the Microsoft.compute resource provider. I understand that this different behavior from many other resource providers, but it is an allowed behavior based on the Azure Resource Provider specification. The Microsoft.compute resource provider team has investigated the work to always return the casing of the RG based on the first time it "sees" the RG, but this would be a very big change in the compute resource provider. At this time the team is not planning to make this rather large investment especially considering that the first time the compute resource provider "sees" the resource group name it may or maynot be the "correct" casing for the resource group. The reason for this is that technically only the top level Azure Resource Provider knows the "correct" casing of the resource group because only that service sees the very first "Create Resource Group" API which should technically define the "correct" casing for the RG. All other resources providers that create resources in that RG only see the casing as provided by the API caller when the resource in the resource group is created for the first time.

@Drewm3
Copy link
Member

Drewm3 commented Jan 15, 2020

Closing because this is the expected behavior currently.

@Drewm3 Drewm3 closed this as completed Jan 15, 2020
@tombuildsstuff
Copy link
Contributor

@Drewm3 thanks for confirming that this is a bug in the API - can we re-open this issue to track fixing this bug in a future API version? Thanks!

@erich-wang
Copy link
Member

reopen this issue per comment from @tombuildsstuff, and assign back to @ArcturusZhang

@Drewm3
Copy link
Member

Drewm3 commented Feb 9, 2020

@tombuildsstuff, this behavior is by design in the API. It is not a bug. Feel free to open a feature request in UserVoice for a design change (aka feature).

@Drewm3 Drewm3 closed this as completed Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compute Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants