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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clean command #2435

Merged
merged 8 commits into from Jul 28, 2022
Merged

Add clean command #2435

merged 8 commits into from Jul 28, 2022

Conversation

rdettai
Copy link
Contributor

@rdettai rdettai commented Jul 18, 2022

It happens that some terraform/terragrunt cache files are left behind after destroying a stack, which can impact subsequent deployments. We propose adding a ./vast-cloud init command that runs init again on all modules. It also has a --clean option that removes the files from previous inits first.

馃摑 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on vast.io, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

馃幆 Review Instructions

  • init on all modules has been made possible by adding mock_outputs on every terragrunt dependency
  • Try running some deploy commands, then run init or init --clean and then continue with other operations

@rdettai rdettai requested a review from dispanser July 18, 2022 14:56
@rdettai rdettai self-assigned this Jul 18, 2022
@rdettai rdettai marked this pull request as draft July 18, 2022 15:21
@rdettai
Copy link
Contributor Author

rdettai commented Jul 18, 2022

making this a draft because the outputs are broken after running clean

@rdettai
Copy link
Contributor Author

rdettai commented Jul 18, 2022

@rdettai rdettai marked this pull request as ready for review July 18, 2022 16:54
Copy link
Contributor

@dispanser dispanser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with:

  1. vast-cloud deploy
  2. vast-cloud init
  3. vast-cloud init --clean
  4. vast destroy

Which seems to work (destroy is still in progress). The PR review instructions don't match, but otherwise everything seems to be fine. Actual usability will be determined the next time terraform enters a borked state, which won't be too long into the future I suppose.

@rdettai
Copy link
Contributor Author

rdettai commented Jul 28, 2022

@rdettai
Copy link
Contributor Author

rdettai commented Jul 28, 2022

@rdettai rdettai merged commit 60197d4 into master Jul 28, 2022
@rdettai rdettai deleted the topic/clean-cmd branch July 28, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants