Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform destroy with -target depends on uninitialised provisioners #1541

Closed
MerlinDMC opened this issue Apr 15, 2015 · 1 comment · Fixed by #1544
Closed

terraform destroy with -target depends on uninitialised provisioners #1541

MerlinDMC opened this issue Apr 15, 2015 · 1 comment · Fixed by #1544
Assignees

Comments

@MerlinDMC
Copy link
Contributor

when trying to destroy a specific subset of resources terraform should ignore the provisioner pipeline:

$ terraform destroy -target=google_compute_instance.cassandra
Do you really want to destroy?
  Terraform will delete all your managed infrastructure.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

  * 1 error(s) occurred:

* 4 error(s) occurred:

* provisioner remote-exec not initialized
* provisioner remote-exec not initialized
* provisioner remote-exec not initialized
* provisioner remote-exec not initialised
@phinze phinze self-assigned this Apr 15, 2015
phinze added a commit that referenced this issue Apr 15, 2015
The `TargetTransform` was dropping provisioner nodes, which caused graph
validation to fail with messages about uninitialized provisioners.

closes #1541
phinze added a commit that referenced this issue Apr 15, 2015
The `TargetTransform` was dropping provisioner nodes, which caused graph
validation to fail with messages about uninitialized provisioners when a
`terraform destroy` was attempted.

This was because `destroy` flops the dependency calculation to try and
address any nodes in the graph that "depend on" the target node. But we
still need to keep the provisioner node in the graph.

closes #1541
phinze added a commit that referenced this issue Apr 27, 2015
The `TargetTransform` was dropping provisioner nodes, which caused graph
validation to fail with messages about uninitialized provisioners when a
`terraform destroy` was attempted.

This was because `destroy` flops the dependency calculation to try and
address any nodes in the graph that "depend on" the target node. But we
still need to keep the provisioner node in the graph.

Here we switch the strategy for filtering nodes to only drop
addressable, non-targeted nodes. This should prevent us from having to
whitelist nodes to keep in the future.

closes #1541
@ghost
Copy link

ghost commented May 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants