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

virtual_desktop_workspace_application_group_association: Force VM replacement since v2.35 (maybe change #9057)? #9491

Closed
pier62350 opened this issue Nov 26, 2020 · 2 comments · Fixed by #9495

Comments

@pier62350
Copy link

pier62350 commented Nov 26, 2020

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

Terraform (and AzureRM Provider) Version

Terraform version: 0.13.5
Provider AzureRM: v0.35+ (including latest v0.37)

Affected Resource(s)

virtual_desktop_workspace_application_group_association

Terraform Configuration Files

resource "azurerm_virtual_desktop_workspace_application_group_association" "workspaceremoteapp" {
  workspace_id         = azurerm_virtual_desktop_workspace.workspace.id
  application_group_id = azurerm_virtual_desktop_application_group.appgroup.id
}

Expected Behaviour

No modification on the existing azurerm_virtual_desktop_workspace_application_group_association

Actual Behaviour

terraform apply cause virtual machine replacement but no modification in tf file. This problem appear in 0.35 and is still present in 0.37. When reverting to 0.34 no modification found when terraform plan/apply
Here is the plan output with 0.35+:

Terraform will perform the following actions:

  # module.azurerm_virtual_desktop_test.azurerm_virtual_desktop_application_group.appgroup will be updated in-place
  ~ resource "azurerm_virtual_desktop_application_group" "appgroup" {
      ~ host_pool_id        = "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourceGroups/TEST-rg/providers/Microsoft.DesktopVirtualization/hostpools/SRVTEST-hp" -> "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourcegroups/TEST-rg/providers/Microsoft.DesktopVirtualization/hostpools/SRVTEST-hp"
        id                  = "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourcegroups/TEST-rg/providers/Microsoft.DesktopVirtualization/applicationgroups/SRVTEST-appgroup"
        location            = "eastus"
        name                = "SRVTEST-appgroup"
        resource_group_name = "TEST-rg"
        tags                = {}
        type                = "Desktop"
    }

  # module.azurerm_virtual_desktop_test.azurerm_virtual_desktop_workspace_application_group_association.workspaceremoteapp must be replaced
-/+ resource "azurerm_virtual_desktop_workspace_application_group_association" "workspaceremoteapp" {
      ~ application_group_id = "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourceGroups/TEST-rg/providers/Microsoft.DesktopVirtualization/applicationgroups/SRVTEST-appgroup" -> "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourcegroups/TEST-rg/providers/Microsoft.DesktopVirtualization/applicationgroups/SRVTEST-appgroup" # forces replacement
      ~ id                   = "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourcegroups/TEST-rg/providers/Microsoft.DesktopVirtualization/workspaces/SRVTEST-ws|/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourcegroups/TEST-rg/providers/Microsoft.DesktopVirtualization/applicationgroups/SRVTEST-appgroup" -> (known after apply)
      ~ workspace_id         = "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourceGroups/TEST-rg/providers/Microsoft.DesktopVirtualization/workspaces/SRVTEST-ws" -> "/subscriptions/XXXXXXXXX-XXXX-XXXX-XXXX/resourcegroups/TEST-rg/providers/Microsoft.DesktopVirtualization/workspaces/SRVTEST-ws" # forces replacement
    }

Steps to Reproduce

  1. Implement VDI hostpool and virtual machine. Use azurerm_virtual_desktop_workspace_application_group_association and update module to 035+
  2. terraform plan

References

It seems there is pull request #9057 has been done on azurerm_virtual_desktop_workspace_application_group_association that can cause this issue

@ghost
Copy link

ghost commented Nov 27, 2020

This has been released in version 2.38.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.38.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Dec 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants