Skip to content

Allowing create and destroy before moving to the next target when running parallelism=1 #17924

Closed
@marcossegovia

Description

@marcossegovia

Is there an easy way that when running parallelism=1 terraform just destroy and create the current machine before jumping to the following target?
This will make me able to reprovision a whole stack (the stack is serving until the current machine is chosen to be reprovisioned) and not destroying all targets at the same time when reprovision.

Terraform Version

v0.11.7

Expected Behavior

vsphere_virtual_machine.assets[0] was destroyed
vsphere_virtual_machine.assets[0] start building
vsphere_virtual_machine.assets[0] finish building
vsphere_virtual_machine.assets[1] was destroyed
vsphere_virtual_machine.assets[0] start building
vsphere_virtual_machine.assets[0] finish building

Actual Behavior

vsphere_virtual_machine.assets[0] was destroyed
vsphere_virtual_machine.assets[1] was destroyed
vsphere_virtual_machine.assets[0] start building
vsphere_virtual_machine.assets[0] finish building
vsphere_virtual_machine.assets[1] start building
vsphere_virtual_machine.assets[1] finish building

Steps to Reproduce

When trying to reprovision 2 machines by the following command:

terraform apply -target="vsphere_virtual_machine.assets[0]" -target="vsphere_virtual_machine.assets[1]" -parallelism=1

References

I think there were a discussion a long ago:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions