GCP issue: when renaming instance groups, Terraform fails to remove VMs properly

Maybe I haven’t explained clearly.

when yo uuse the string value, it will just be seen as a string and Terraform won’t reconginize the dependency between sample_mig and sample_template_version1, but if you use instance_template = module. sample_template_version1.self_link, then terraform will recongnize the dependency, when you rename sample_template_version1 to sample_template_version2, it will be recreated , which means all resource dependent on sample_template_version1 will be removed…

Woud you mind giving it a try?