integrations / terraform-provider-github

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

[DOCS]: github_organization name is not listed as required, but validation fails when missing #2263

Open dannysauer opened 1 month ago

dannysauer commented 1 month ago

Describe the need

I want to get the owner name for the provider. It seemed that the most reasonable way to do this is with an empty github_organization data source, since the documentation does not indicate that the name is required. However, when attempting to validate my config, I get a failure indicating that name is, in fact, required.

Ideally, the documentation would be accurate, and the name would end up being the owner field from the provider, or the auth'd username otherwise. :)

Example code:

# default github provider
provider "github" {}

# operations in determined-ai github project
provider "github" {
  alias = "determined"
  owner = "determined-ai"
}

data "github_organization" "determined_ai" {
  provider = github.determined
}

I then expected to be able to use "https://github.com/${data.github_organization.determined_ai.orgname}" later to get "https://github.com/determined-ai".

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct