terraform-provider-github
terraform-provider-github copied to clipboard
Not able to create GitHub Organization Project
Hi,
I am not able to create an organization project. It is throwing this error.
Error: POST https://api.github.com/orgs/my-org/projects: 410 Projects are disabled for this organization []
This is my code for reference:
terraform {
required_version = ">= 1.4.0, < 2.0.0"
required_providers {
github = {
source = "integrations/github"
version = "~> 5.0"
}
}
}
// Provider items are being passed through environment variables.
resource "github_organization_project" "this" {
for_each = var.organization_project
name = each.value["name"]
body = each.value["body"]
}
SDK Version No response
API Version No response
Relevant log output
Error: POST https://api.github.com/orgs/my-org/projects: 410 Projects are disabled for this organization []
with module.organization.github_organization_project.main["org-project"],
on ../../terraform/terraform-github-organization/main.tf line 64, in resource "github_organization_project" "main":
64: resource "github_organization_project" "main" {
Under Code, planning, and automation in Organization settings, I have "checked" Enable Projects for the organization
Any development for this?
Any development for this?
No. I am still waiting on it to be fixed.
Any development for this?
No. I am still waiting on it to be fixed.
Is there anything I can help?
PRs are appreciated!
Now that classic projects are no longer available (at least to users that didn't already create one), would this bug be resolved by migrating this feature to the GraphQL endpoint instead of the REST API?
I see other resources are already managed with GraphQL.
Also, moving to graphQL may mean a breaking change. Unless we want to have github_organization_project for classic and github_organization_project_v2 for the new implementation, which sounds off considering the "new" implementation is just called "Projects".
Still not working as of version 6.2.3. Appreciate any update on the progress of it. Thanks
same here. since classic projects are not available anymore, we have no way to automate the creation of projects now.
A not so great workaround is to achieve this through running custom code (using python or JS, for example) for creation of GitHub Projects V2 using GitHub graphQL API; Get that triggered using TF's null_resource and local_exec provisioner. This gets the job done but because its through a null_resource TF state won't know anything about it.
I tried to create the project on GitHub.com and import it using:
terraform import github_organization_project.my_project 3
Unfortunately, this imports not project 3 but project 1 (which was deleted), see the url:
# github_organization_project.my_project:
resource "github_organization_project" "my_project" {
body = "this is my project"
etag = "..."
id = "3"
name = "time to project 🐠🐟🌊"
url = "https://github.com/orgs/my-org/projects/1"
}
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
This should remain open and be fixed.