terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

🏳️ Custom properties resource & data

Open alileza opened this issue 2 years ago • 3 comments

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 avatar Jan 16 '24 21:01 alileza

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)?

Simon-Boyer avatar Mar 19 '24 15:03 Simon-Boyer

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.

Simon-Boyer avatar Mar 25 '24 20:03 Simon-Boyer

Looks like go-github has been updated to v62 with PR https://github.com/integrations/terraform-provider-github/pull/2304 merged in place of PR https://github.com/integrations/terraform-provider-github/issues/2187 !

Pirikara avatar Jul 11 '24 03:07 Pirikara

Given that #2316 has been merged and released this should really be a priority. @alileza are you still actively working on this?

stevehipwell avatar Jan 17 '25 10:01 stevehipwell

➕ 1️⃣ on getting this merged. Would love to migrate our bash scripts to TF, but need this functionality.

graham1228 avatar Mar 14 '25 15:03 graham1228

CI is failing because it's looking for an older version of go-github @ v57 whereas the version in branch is v66.

nickfloyd avatar Oct 20 '25 13:10 nickfloyd

Additionally, we will need to merge in docs for this change after this PR get's merged.

nickfloyd avatar Oct 20 '25 13:10 nickfloyd