integrations / integrations/terraform-provider-github
[FEAT]: Data Source with Owner/Organization/Enterprise Context
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Describe the need
We can use the following to get context about the currently authenticated user:
```terraform
data "github_user" "_" {
username = ""
}
```
It would be great to be able to get information about the current owner/organization/enterprise such that it can rely on the current authentication context to determing if the `GITHUB_OWNER` is an organization or enteprise.
This can be useful for variable validation when specific arguments or nested blocks can only be used in a certain context, like the `branch_name_pattern` nested block in the `github_repository_ruleset` resource.
### SDK Version
_No response_
### API Version
_No response_
### Relevant log output
```shell
N/A
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.