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

[#TF-723] proactively check for RUM before safe delete #699

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Conversation

emlanctot
Copy link
Contributor

@emlanctot emlanctot commented Nov 21, 2022

Description

This PR is adding a proactive check for resources under management during safe deletes. If there are any RUM detected it will preemptively fail without calling the safe delete API.

Testing plan

  1. Create a workspace without the force_delete.
  2. Add resources to the workspace
  3. Attempt to delete the workspace
  4. Expect to see this error returned:
    Error: Error deleting workspace <workspace id>: This workspace has <number of resources> resources under management and must be force deleted by setting force_delete = true

External links

Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.

Output from acceptance tests

Please run applicable acceptance tests locally and include the output here. See TESTS.md to learn how to run acceptance tests.

If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.

=== RUN   TestTFEWorkspace_delete_withoutCanForceDeletePermission
2022/11/20 20:47:58 [DEBUG] Delete workspace ws-testing
2022/11/20 20:47:58 [DEBUG] Delete workspace ws-testing
2022/11/20 20:47:58 [DEBUG] Delete workspace ws-testing
--- PASS: TestTFEWorkspace_delete_withoutCanForceDeletePermission (0.69s)
PASS

Process finished with the exit code 0


...

@emlanctot emlanctot requested a review from a team as a code owner November 21, 2022 04:48
@emlanctot emlanctot changed the title feat: proactively check for RUM before safe delete [#TF-723] proactively check for RUM before safe delete Nov 21, 2022
Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

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

Just one CHANGELOG issue

CHANGELOG.md Outdated Show resolved Hide resolved
@emlanctot emlanctot merged commit b13737b into main Nov 21, 2022
@emlanctot emlanctot deleted the eml/tf-723 branch November 21, 2022 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants