terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

[BUG]: this resource can only be used in the context of an organization, "xxx" is a user

Open ljw4010 opened this issue 1 year ago • 1 comments

Expected Behavior

after creating a new ORG on Enterprise git, we can set up org settings direcrtly

Actual Behavior

│ Error: this resource can only be used in the context of an organization, "xxx" is a user │ │ with .github_team.create_team_to_org["xxxx"],

Terraform Version

1.5.x

Affected Resource(s)

Resources related to organizational configuration: github_organization_settings github_team ...

Terraform Configuration Files

data "github_enterprise" "get_enterprise" {}
resource "github_enterprise_organization" "create_org" {}
resource "github_organization_settings" "update_org_settings" {}
resource "github_team" "create_team_to_org" {}

Steps to Reproduce

terrform apply

Debug Output

No response

Panic Output

│ Error: this resource can only be used in the context of an organization, "xxx" is a user
│ 
│   with .github_team.create_team_to_org["xxxx"],

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ljw4010 avatar Jun 03 '24 05:06 ljw4010

after the github_enterprise_organization called, the new ORG will be set up, but for a new org, the IsOrganization still is false, this field seems only to be initial in the begin instead of after creating the new org

ljw4010 avatar Jun 03 '24 05:06 ljw4010

👋 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!

github-actions[bot] avatar Mar 01 '25 02:03 github-actions[bot]