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

Support for state refresh from script #4890

Closed
MarcelT-NL opened this issue Nov 15, 2019 · 3 comments
Closed

Support for state refresh from script #4890

MarcelT-NL opened this issue Nov 15, 2019 · 3 comments

Comments

@MarcelT-NL
Copy link

MarcelT-NL commented Nov 15, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

It would be great if you could issue a forced “refresh” at the top of the script, forcing the saved state to be deleted/ignored and recreated from the live environment.

Rationale:

Sometimes a terraform script fails, for whatever reason and you need to delete some assets manually (eg. in the Azure portal).

Being able to have the state forcefully refreshed would solve a lot of manual work.

Also, when using Terraform.io (Cloud), there is no way to run CLI commands so no refresh option. Sometimes you have to delete and recreate the workspace because the state is out of sync with reality and terraform consistently fails when running.

New or Affected Resource(s)

Terraform state

Potential Terraform Configuration

New command for scripts:

terraform_state_refresh

@tombuildsstuff
Copy link
Member

hi @MarcelT-NL

Thanks for opening this issue.

Since this is a Feature Request for Terraform Core rather than being specific to the Azure Provider - would you mind re-opening this issue on that repository where someone from the Core team should be able to comment?

Thanks!

@MarcelT-NL
Copy link
Author

MarcelT-NL commented Nov 15, 2019

Hi Tom,

Done, thanks!

See Issue 23388

@ghost
Copy link

ghost commented Mar 29, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

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

No branches or pull requests

2 participants