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

Partial failure of provider fails to taint resource #434

Closed
ryanuber opened this issue Oct 16, 2014 · 4 comments
Closed

Partial failure of provider fails to taint resource #434

ryanuber opened this issue Oct 16, 2014 · 4 comments

Comments

@ryanuber
Copy link
Member

Droplet was created, but provisioner was never run.

digitalocean_droplet.nyc1-server1: Error: Error waiting for droplet (2896483) to become ready: couldn't find resource
Error applying plan:

1 error(s) occurred:

* Error waiting for droplet (2896483) to become ready: couldn't find resource

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
tf master » terraform plan
Refreshing Terraform state prior to plan...

digitalocean_droplet.sfo1-server3: Refreshing state... (ID: 2896436)
@ryanuber ryanuber added the bug label Oct 16, 2014
@ryanuber
Copy link
Member Author

On a subsequent terraform apply, the resource appears to be in sync, but the provisioner will not be run at this point.

@mitchellh
Copy link
Contributor

Notes: it looks like we need to set the resource as tainted if there are provisioners and there was an error from the initial Apply call.

I don't think it is tainted if there are no provisioners, or its not a creation event. Terraform is meant to handle partial state, so this should work fine. But due to us throwing away connection info, this results in a broken partial state for this case.

Thoughts @armon?

@mitchellh
Copy link
Contributor

Fixed in line to my comment above

@armon
Copy link
Member

armon commented Oct 19, 2014

Sounds right to me

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

No branches or pull requests

3 participants