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

azurerm_virtual_desktop_scaling_plan #23883

Open
1 task done
Untamedlogic opened this issue Nov 13, 2023 · 2 comments
Open
1 task done

azurerm_virtual_desktop_scaling_plan #23883

Untamedlogic opened this issue Nov 13, 2023 · 2 comments

Comments

@Untamedlogic
Copy link

Untamedlogic commented Nov 13, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.6.3

AzureRM Provider Version

3.77.0

Affected Resource(s)/Data Source(s)

azurerm_virtual_desktop_scaling_plan,

Terraform Configuration Files

resource "azurerm_virtual_desktop_scaling_plan" "example" {

host_pool {

     hostpool_id          = /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DesktopVirtualization/hostpools/hostPoolValue

     scaling_plan_enabled = true
   }

}

Debug Output/Panic Output

Error: parsing "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DesktopVirtualization/hostPools/hostpoolValue": parsing segment "staticHostPools": parsing the HostPool ID: the segment at position 6 didn't match

Expected Behaviour

It should not show an error when the P in hostPoolValue is lowercase.

This shows as lower case, hostpool, within the virtual_desktop_scaling_plan resource when viewed from the portal. However, azurerm is expecting the a to be Uppercase.

Is this intended or is the casing here expected to match what's required in Azure?

Actual Behaviour

Validation Error as shown above.

Steps to Reproduce

No response

Important Factoids

No response

References

issue-23363

Other instances of mismatched casing:

issue-23378

@sinbai
Copy link
Contributor

sinbai commented Nov 14, 2023

Hi @Untamedlogic thanks for opening this issue. I apologize for the trouble this issue has caused you. The fact is that in the current design of Terraform, the resource Id entered by the user is case-sensitive. So this is intentional. It is worth mentioning that this principle is also followed when using Terraform Import command. Taking resource azurerm_virtual_desktop_host_pool as an example, the Id should be /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/hostPools/myhostpool instead of /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/hostpools/myhostpool . Thank you for your understanding.

@Untamedlogic
Copy link
Author

Hi @sinbai,

Thank you for the response. If I update the resource locally to account for the case the terraform plan shows a change in the host_pool_id of the resource. The backstory here is I'm trying to import this scaling plan and I'm running into this conflict. My goal is to get this value assigned without changing the ID in Azure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants