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

Implement archive_on_destroy attribute for projects. Closes #761 #816

Merged

Conversation

timofurrer
Copy link
Member

@timofurrer timofurrer commented Jan 28, 2022

This change implements an archive_on_destroy attribute on the
gitlab_project resource. It defaults to false, if set to true, on
a destroy it will archive the project instead of deleting it.

This is especially useful in organizations where repositories need to
be kept for regulatory purposes and can't be deleted.

PS: the diff is a mess: I've basically just if'ed the DeleteProject case depending on the archive_on_destroy attribute and called ArchiveProject in the new branch :)

Copy link
Collaborator

@armsnyder armsnyder 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. I left one optional feedback comment. This differs from the upstream API (normally bad) but I think it's ok in this case because one could look at archiving as being a deletion strategy.

This change implements an `archive_on_destroy` attribute on the
`gitlab_project` resource. It defaults to `false`, if set to `true`, on
a destroy it will *archive* the project instead of deleting it.

This is especially useful in organizations where repositories need to
be kept for regulatory purposes and can't be deleted.
@timofurrer timofurrer force-pushed the feature/archive-on-destroy-761 branch from aaf0e0a to 8f6754b Compare January 29, 2022 22:41
@armsnyder
Copy link
Collaborator

lgtm 😄

@armsnyder armsnyder added this to the 3.9.0 milestone Feb 2, 2022
@armsnyder armsnyder merged commit be59cd1 into gitlabhq:master Feb 2, 2022
@github-actions
Copy link

github-actions bot commented Feb 4, 2022

This functionality has been released in 3.9.0 of the Terraform GitLab Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue. Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants