-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Allow archiving on destroy. #89
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
base: main
Are you sure you want to change the base?
Conversation
|
Similarly to https://gitea.com/gitea/terraform-provider-gitea/commit/8d483a8a8df956a026defed92f313258197a4858. |
5545d8c to
f42b597
Compare
|
Hi @kad-hollac1, thanks for opening this PR! Can you describe the specific scenario you're addressing with this change? Also, please take a look at the linter errors. |
f42b597 to
66f11d5
Compare
|
Sure! In our organisation, we're moving towards managing our Forgejo instance from code, including the repositories. As our developers are human, we want to prevent them from (accidentally) deleting data. As such we want to preserve a repository when it is removed from state by Terraform. We can set a lifecycle tag to prevent destroy, but that means that that teams keep unused repositories in their configuration. Hence we've taken the GitHub route to implement [0]. |
66f11d5 to
badc067
Compare
|
Hi @kad-hollac1, many thanks for the explanation. This looks like an interesting approach - thank you very much for the contribution! We should add some testing for the behavior, though. I'd suggest the following approach:
Does this make sense? |
badc067 to
f459411
Compare
|
I've put it in two steps, the second step has only the data source of the repo. Thanks for the suggestion! :) [EDIT] |
c08472a to
9d9389e
Compare
9d9389e to
4d8d3e8
Compare
No description provided.