How to apply a partial Terraform plan

I am using Terraform to primarily provision my Kubernetes node VMs via the OpenStack and Rancher providers. There is an issue where one of my worker nodes is in an error state at the host OS level and I want to simply destroy and recreate it. When I run terraform plan, there are other resources that are listed as being recreated that I do not want to be modified. Is there a way to cherry-pick the plan so that only this single worker node gets recreated?

Command: plan - Terraform by HashiCorp (resource targeting) might help

@aareet thanks! That’s exactly what I was looking for. The funny thing is I had read through most of that documentation but stopped just short of that section :laughing:

1 Like