integrations / terraform-provider-github

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

🏳️ Custom properties resource & data #2107

Open alileza opened 9 months ago

alileza commented 9 months ago

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

Does this introduce a breaking change?

Please see our docs on breaking changes to help!


Simon-Boyer commented 7 months ago

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 commented 7 months ago

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.

Pirikara commented 4 months ago

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 !