Closed lyz-code closed 1 year ago
It seems that the team members are not imported either, this is not that bad because in the first apply they are overwritten
Hi @lyz-code ,
i can confirm your observation and in theory the fix for it should be easy, but there seems to be a bug in the gitea api where a GET /teams/{id}
returns null
for the organization field...
{
"id": 13,
"name": "test_team",
"description": "test team of test org",
"organization": null,
"includes_all_repositories": true,
"permission": "admin",
"units": [
"repo.releases",
"repo.projects",
"repo.packages",
"repo.pulls",
"repo.wiki",
"repo.ext_wiki",
"repo.code",
"repo.issues",
"repo.ext_issues"
],
"units_map": {
"repo.code": "admin",
"repo.ext_issues": "admin",
"repo.ext_wiki": "admin",
"repo.issues": "admin",
"repo.packages": "admin",
"repo.projects": "admin",
"repo.pulls": "admin",
"repo.releases": "admin",
"repo.wiki": "admin"
},
"can_create_org_repo": true
}
this needs to be fixed upstream i fear
Reported upstream here: https://github.com/go-gitea/gitea/issues/24734
if you would like to add anything to my description feel free to add your comment there 😃
Thank you for taking care of it, and damn they are fast fixing bugs!
indeed 😃 now just need to wait until this is released and i need to check the version where the fix is present in order to not break the functionality for older gitea releases. will update this issue when i release the fix. thanks again for the report
Describe the bug When importing a team the required
organisation
field is not set. So when you try to do aplan
the resource gets replaced as it's trying to change from""
to the value you want to set.To Reproduce Steps to reproduce the behavior:
terraform plan
Expected behavior When importing an organisation team, the
organisation
field should be set in the state.Log Output If applicable, add logs to help explain your problem.
Additional Data Important for reproducability.
Terraform Version: v0.13.1
Operating System: Linux
Provider Version: v0.12.3