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

Deleted MX record fails refresh in DO #279

Closed
ndarilek opened this issue Sep 9, 2014 · 4 comments
Closed

Deleted MX record fails refresh in DO #279

ndarilek opened this issue Sep 9, 2014 · 4 comments

Comments

@ndarilek
Copy link
Contributor

ndarilek commented Sep 9, 2014

Was having some issues with the Digital Ocean provider, so I manually deleted an MX record thinking Terraform would either recreate it or prune the state file. Bad idea, apparently. Now all Terraform actions fail because there is an error retrieving the record for the deleted API element.

Lesson learned, but it would be nice to have some mechanism manual or automatic for cleaning up state. Maybe if the API call fails with a 404, the Digital Ocean provider specifically or providers in general can mark the resource as missing and recreate it on the next run if possible?

And, more generally, it'd be nice to be able to dump and restore state files. Ideally Terraform does all necessary edits, but it's bound to make mistakes at this early phase and it'd be nice if I can clean those up.

Any tips on how I can get this digitalocean_record out of my tfstate in the meantime?

@mitchellh
Copy link
Contributor

This is just a bug in Terraform. I've tagged it as such. Can you give us the error logs? It'd help us.

State files are getting an overhaul in 0.3 which should also help with this, but we'll keep that as a separate issue.

@mitchellh mitchellh changed the title Provide way to manually clean up state Deleted MX record fails refresh in DO Sep 9, 2014
@mitchellh
Copy link
Contributor

Fixed

@ndarilek
Copy link
Contributor Author

ndarilek commented Sep 9, 2014

How do I obtain an error log? Also, since this issue is closed, how
should it be sent?

Or was it resolved?

Thanks.

@mitchellh
Copy link
Contributor

I resolved it!

@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

2 participants