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

🏳️ Custom properties resource & data #2107

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alileza
Copy link

@alileza alileza commented Jan 16, 2024

Resolves #1956

data.github_organization_custom_properties.prop_team: Reading...
data.github_organization_custom_properties.prop_team: Read complete after 0s [id=org-custom-properties]

Changes to Outputs:
  + team = {
      + allowed_values = [
          + "v1-alpha"
          + "v2-alpha"
          + "v2-beta"
        ]
      + default_value  = ""
      + description    = <<-EOT
            GitHub action for policy check based on conftest
            
            https://github.com/alileza/gha-team
        EOT
      + id             = "prop_team"
      + property_name  = "version"
      + required       = false
      + value_type     = "single_select"
    }

You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.

Before the change?

After the change?

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@alileza alileza force-pushed the custom-properties branch 3 times, most recently from d5be511 to 3432109 Compare January 16, 2024 21:57
@alileza alileza changed the title [WIP] Custom properties 🏳️ Custom properties resource & data Jan 17, 2024
@alileza alileza marked this pull request as ready for review February 20, 2024 20:34
@Simon-Boyer
Copy link

If I'm ready this correctly, this is only adding support to create/read custom properties definitions, would it also be possible to add support for defining custom properties values (by repo)?

if err := resourceGithubCustomPropertiesCreate(d, meta); err != nil {
return err
}
return resourceGithubTeamRead(d, meta)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably want to return the resourceGithubCustomPropertiesRead(d, meta) value, I guess this is a typo

@Simon-Boyer
Copy link

If I'm ready this correctly, this is only adding support to create/read custom properties definitions, would it also be possible to add support for defining custom properties values (by repo)?

I've looked a bit into it, and it should be possible once PR #2188 is merged to update go-github, since there was bug relating to that api that was fixed. I'm likely to try to build a working version of that feature on my side, i'll follow up there once it's done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Support GitHub repository custom properties
3 participants