Because we're using -target on the VMs (to enable reimaging), the NICs don't get deleted. This isn't fixable within the terraform template: destroy will also affect things which have a depends_onto the targeted resource you can't add a depends_on to the NICs pointing to the VMs as the VMs implicity depend on the NICs, so TF complains of a cycle.
If we were just using apply without -target to redefine the infra we wouldn't have this issue, but then reimaging will also destroy/recreate existing nodes.
Because we're using -target on the VMs (to enable reimaging), the NICs don't get deleted. This isn't fixable within the terraform template:
destroy
will also affect things which have adepends_on
to the targeted resource you can't add adepends_on
to the NICs pointing to the VMs as the VMs implicity depend on the NICs, so TF complains of a cycle.If we were just using
apply
without-target
to redefine the infra we wouldn't have this issue, but then reimaging will also destroy/recreate existing nodes.