Fixed a bug that when a linode is unassigned from a placement group outside of terraform (i.e. using cloud manager), we still can identify that change when refresh the state.
✔️ How to Test
Test steps:
Pull this PR and initialize terraform in a sandbox environment, i.e. dx-devenv
Create a placement group and instance resource, and assign the instance to that PG
resource "linode_instance" "foobar" {
label = "test-tf-instance"
type = "g6-standard-1"
region = "us-mia"
image = "linode/alpine3.19"
placement_group {
id = linode_placement_group.test.id
}
}
3. Now go to Cloud Manager and unassign the instance from the PG
4. Run `terraform plan` or `make plan` again. Notice that there is an update in-place and terraform will add the instance back to the PG
5. Destroy the resources created for clean up
📝 Description
Fixed a bug that when a linode is unassigned from a placement group outside of terraform (i.e. using cloud manager), we still can identify that change when refresh the state.
✔️ How to Test
Test steps:
resource "linode_instance" "foobar" { label = "test-tf-instance" type = "g6-standard-1" region = "us-mia" image = "linode/alpine3.19" placement_group { id = linode_placement_group.test.id } }