integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
862 stars 707 forks source link

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

Open ljw4010 opened 1 month ago

ljw4010 commented 1 month ago

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

ljw4010 commented 1 month ago

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