Unable to import organisation #7
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/terraform-provider-gitea#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am unable to import an organisation into Terraform.
Below is the log of the error.
I investigated it a bit and it seems the problem is the use of
schema.ImportStatePassthrough
. Apparently, if you use that feature, you can only used.Id()
when refreshing the state. See https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/import#importer-state-function.In the
resourceOrgRead
functiond.get(orgName)
is used, so this fails.@techknowlogick I checked the Gitea API and it does not seem possible to get an organisation using its ID instead of the name. Not sure how to fix this.
Hi @pim
i think this was fixed in my fork already with https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea/pulls/13 and released under my version 0.7.2
i would kindly ask you to re check once we get a full release out of the official provider if this is working then
@lerentis Hi, thanks for the heads-up. I didn't continue using the official provider, but I'm excited to try it again once your code is merged!
@pim could you try with v0.3.0 of this provider? It has @lerentis's changes merged in.
Can confirm it is working, thanks!