integrations / terraform-provider-github

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

feature request: Add support for 'public' attribute on github pages configuration #1045

Open pkwarren opened 2 years ago

pkwarren commented 2 years ago

We'd like to use the Github pages functionality of the terraform provider, however currently it doesn't support the github pages 'public' option: https://github.com/google/go-github/blob/178169fc04bc4a05ca48f98709cdd02ab5b556e3/github/repos_pages.go#L21

Terraform Version

v1.1.4

Affected Resource(s)

Terraform Configuration Files

resource "github_repository" "example" {
  name        = "example"
  description = "My awesome web page"
  private = true
  pages {
    source {
      branch = "main"
      path   = "/docs"
    }
    # TODO: Doesn't work
    public = false
  }
}

Expected Behavior

Should be able to configure 'public = false' to limit visibility of github pages.

Actual Behavior

Option not yet supported.

pkwarren commented 2 years ago

It looks like this will require fixes to upstream GitHub module: https://github.com/google/go-github/issues/2261

btkostner commented 2 years ago

Looks like it has been included upstream and will be included in the next release

btkostner commented 2 years ago

go-github has released v43.0.0 which includes the fix here https://github.com/google/go-github/releases/tag/v43.0.0

btkostner commented 2 years ago

This issue should not yet be closed

kfcampbell commented 2 years ago

Oh I'm sorry! Thanks for catching this @btkostner.

github-actions[bot] commented 1 year ago

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

btkostner commented 1 year ago

Currently waiting for PR to merge

ViacheslavKudinov commented 1 year ago

We need this feature! 🙏🏻

dweaver33 commented 1 year ago

image

calebworks commented 1 year ago

Any updates on this?

ViacheslavKudinov commented 5 months ago

Hello, any updates or was it implemented ?

Luis-3M commented 1 month ago

What else is needed to make this feature available?

btkostner commented 1 month ago

It looks like the upstream lower level API library has this feature released now. Someone just needs to open the PR for it in the terraform provider.