Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform github_organization doesn't allow for retrieval of actual org identifier, only Descriptive one, if present. #709

Closed
mykelalvis opened this issue Feb 25, 2021 · 5 comments
Labels
d/organization Good first issue Good for newcomers Type: Feature New feature or request

Comments

@mykelalvis
Copy link

Terraform Version

Terraform v0.14.7
+ provider registry.terraform.io/hashicorp/github v4.5.0
+ provider registry.terraform.io/hashicorp/local v2.1.0

Affected Resource(s)

  • github_organization
    If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

data "github_organization" "somewhereorg" {
    name = "somewhere"
}

Expected Behavior

I'd expect to be able to retrieve the string somewhere from data.github_organization.somewhereorg.orgname (or some similar attribute (orgslug? I dunno)

Actual Behavior

The only viable outputs are .id (an integer) and .name which is the descriptive text of the organization (e.g "The Somewhere Organization")

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Make a github_organization data resource as above.
  2. Attempt to use that as the template.owner of a github_repository resource
  3. Be sad.
@jcudit jcudit added d/organization Type: Feature New feature or request Good first issue Good for newcomers labels Feb 26, 2021
@jcudit
Copy link
Contributor

jcudit commented Feb 26, 2021

Be sad.

💔

@Kavinraja-G
Copy link
Contributor

Kavinraja-G commented Jan 9, 2022

Is this still needed ? @jcudit I would like to work on this issue. Thanks! :)

@jcudit
Copy link
Contributor

jcudit commented Jan 27, 2022

@Kavinraja-G yes, this does not conflict with other feature development. Feel free to link a PR to this issue when ready for review and THANK YOU!

(sorry for the late reply)

@pallxk
Copy link
Contributor

pallxk commented Mar 2, 2022

data.github_organization.somewhereorg.login, the login of the organization account, should be what you need.

@kfcampbell
Copy link
Member

This should now be fixed in #1052 and release v4.23.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d/organization Good first issue Good for newcomers Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants