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

Feat: support removal_strategy on destroy environment #812

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

TomerHeber
Copy link
Collaborator

@TomerHeber TomerHeber commented Mar 21, 2024

Issue & Steps to Reproduce / Feature Request

resolves #806

Solution

  1. Added 'removal_strategy' to the schema (defaults to: 'destroy') and required functionality.
  2. Added a PUT API call that marks the environment as isArchived 'true'.
  3. Added unit test for the new API call.
  4. Added an acceptance test.
  5. Added an integration test.

@@ -41,7 +41,7 @@ jobs:
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist
args: release --clean
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unrelated.
--rm-dist is deprecated.

@@ -335,6 +335,13 @@ func resourceEnvironment() *schema.Resource {
Optional: true,
Default: false,
},
"removal_strategy": {
Type: schema.TypeString,
Description: "by default when removing an environment, it gets destroyed. Setting this value to 'mark_as_archived' will force the environment to be archived instead of tying to destroy it ('Mark as inactive' in the UI)",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I hope the description is clear enough.

Copy link
Contributor

@tomer-landesman tomer-landesman left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@github-actions github-actions bot added ready to merge PR approved - can be merged once the PR owner is ready and removed pending final review labels Mar 27, 2024
@TomerHeber TomerHeber merged commit d0e0f83 into main Mar 27, 2024
10 checks passed
@TomerHeber TomerHeber deleted the feat-removal-strategy-#806 branch March 27, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support removal_strategy on destroy environment
2 participants