terraform-provider-github
terraform-provider-github copied to clipboard
Manage organizations by Enterprise Account
Hello,
would like to manage GitHub organizations (creating, renaming, deleting) by terraform.
I have not found resource_github_organization resource to create/update/delete organization by terraform.
Found that it is possible by GitHub API, but you need enterprise account (in oposit of organization account used for most cases) to do so:
https://docs.github.com/en/[email protected]/rest/reference/enterprise-admin
This is my very first terraform provider resource/test implementation and after running acceptance tests
TF_LOG=DEBUG TF_ACC=1 go test -v ./... -run TestAccGithubOrganization$
I'm not able to pass this on public github.com.
Error: POST https://api.github.com/admin/organizations: 404 Not Found []
Is this a limitation of public GitHub and creating organizations is possible only on Enterprise GitHub?
There are few more questions, I'm not sure about:
- Do github provider support authentication by Enterprise Account? Where to pass this, if GITHUB_OWNER does not fit to it?
- How to test against GHE, specially where to pass
base_url - How to proper test Enterprise Account use cases in acceptance tests
Many thanks for collaborating on this.