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

failed destroy dropping resources (environments) on the floor #686

Closed
automaticgiant opened this issue Aug 1, 2023 · 2 comments · Fixed by #946
Closed

failed destroy dropping resources (environments) on the floor #686

automaticgiant opened this issue Aug 1, 2023 · 2 comments · Fixed by #946
Assignees
Labels
enhancement New feature or request

Comments

@automaticgiant
Copy link

I'd like to feature request some adjustment to the Environment resource destroy UX.
I understand that when destroying Terraform-provisioned Environments, the happy path would be to:

  • set force_destroy
  • make sure the Environment is converged and no plans Waiting for Approval, and no errors on the Environment, like missing Terraform config
  • remove the Environment resource from the config, or Destroy the config
  • then my understanding is that it will run a destroy in the Environment and that functionality will archive after completion

The part that kinda breaks from Terraform norms is that this last phase is out of Terraform's control or awareness.

I understand the concern that you may not want to or be able to (depending on config/credentials/etc) wait for an operation to
complete on the referenced Environment while you're processing the containing Environment, but maybe this can/should be a flag to choose this behavior?

To me, ideally, if the target Environment's destroy can't proceed, I'd like containing Terraform config to fail to destroy.
Again, the hole I fall into is that the containing config has stopped tracking the Environment IDs, but I have Environments that need cleaned up manually.

Idk if this is somehow less valid since Env0 isn't really a Terraform specific/only tool, but from a perspective of using Terraform to configure Env0 to manage Terraform, it feels like a big gap.

@yaronya
Copy link
Contributor

yaronya commented Sep 30, 2023

Hi @automaticgiant
Apologies for the late response on this issue.

Would a wait_for_destroy flag or similar have assisted you in this case?

@automaticgiant
Copy link
Author

automaticgiant commented Oct 9, 2023

that would be great @yaronya !
i think i would always set/use that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants