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
|
Thanks much @kad-hollac1! The code looks good, merging it now. |
|
Thank you! for the review and maintaining this provider. :) |
No description provided.