Repository navigation
[FEAT] Add github_repository_pages Resource and Data Source - #3168
Merged
stevehipwell merged 30 commits intoApr 22, 2026
Merged
stevehipwell merged 30 commits into
stevehipwell merged 30 commits into
Conversation
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
deiga
force-pushed
the
add-github_repository_pages-resource
branch
2 times, most recently
from
February 13, 2026 22:14
e081a2d to
c75d366
Compare
3 of 4 tasks
stevehipwell
requested changes
Feb 16, 2026
stevehipwell
left a comment
Collaborator
There was a problem hiding this comment.
This is looking really good.
deiga
force-pushed
the
add-github_repository_pages-resource
branch
from
February 17, 2026 20:09
c75d366 to
91f6484
Compare
stevehipwell
requested changes
Feb 18, 2026
4 tasks
Collaborator
Author
|
@healiha I'll check that out |
github_repository_pages Reasource and Data Sourcegithub_repository_pages Resource and Data Source
Collaborator
|
@deiga could you please rebase this PR? |
deiga
force-pushed
the
add-github_repository_pages-resource
branch
from
February 21, 2026 06:23
18c8135 to
55b203a
Compare
stevehipwell
requested changes
Feb 23, 2026
deiga
force-pushed
the
add-github_repository_pages-resource
branch
from
February 23, 2026 17:15
7a1f79f to
56b7d70
Compare
stevehipwell
requested changes
Feb 24, 2026
added 20 commits
April 22, 2026 23:02
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
… setting in Create Signed-off-by: Timo Sand <[email protected]>
…unnecessary Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
deiga
force-pushed
the
add-github_repository_pages-resource
branch
from
April 22, 2026 20:02
8d9462e to
1babab0
Compare
stevehipwell
approved these changes
Apr 22, 2026
Collaborator
|
LGTM |
robert-crandall
approved these changes
Apr 22, 2026
alunduil
added a commit
to alunduil/alunduil-infrastructure
that referenced
this pull request
May 9, 2026
## Summary `blog.alunduil.com` Pages now serves HTTP traffic with a 301 to HTTPS, managed by Terraform — no more manual toggle in the Pages UI. ## Gotchas - **Issue #35's premise was stale.** The motivation said "the GitHub provider doesn't expose `enforce_https` cleanly enough to manage in Terraform." That changed under us: [terraform-provider-github#3168](integrations/terraform-provider-github#3168) merged 2026-04-22, shipped in v6.12.0 the next day, and the lockfile is already on v6.12.1 (commit `2bb1846`). So instead of the manual UI flip, the field flows through the `var.repositories` `pages` schema (`https_enforced = optional(bool)`), defaulting to `null` so existing repos see no plan diff. - **Provider quirk to note:** `https_enforced` only applies when `cname` is set. `blog.alunduil.com` already has one, so this is a no-op constraint here, but worth knowing if a future Pages site goes in without a custom domain. ## Verification - `terraform validate` passes; `terraform fmt -check` clean. - `terraform plan` against the live state produces a single in-place update on `github_repository_pages.managed["blog.alunduil.com"]`, flipping `https_enforced = false -> true`. No drift on anything else. ``` Plan: 0 to add, 1 to change, 0 to destroy. ``` - HTTP-redirect verification (the issue's third acceptance criterion) has to wait until apply lands on main; current `curl -sI http://blog.alunduil.com` returns 404 directly because Pages doesn't redirect to HTTPS until the setting flips. Closes #35.
1 task done
austenstone
pushed a commit
to austenstone/terraform-provider-github
that referenced
this pull request
Jun 9, 2026
…ations#3168) * Add resource for repository pages and deprecate it from repository R Signed-off-by: Timo Sand <[email protected]> * Add data source for repository pages and deprecate it from repository DS Signed-off-by: Timo Sand <[email protected]> * Update formatting of docs page Signed-off-by: Timo Sand <[email protected]> * Change `github_repository` to only Read pages info if pages is in the config Signed-off-by: Timo Sand <[email protected]> * Fix faulty test Signed-off-by: Timo Sand <[email protected]> * Update Import test Signed-off-by: Timo Sand <[email protected]> * Add `repository_id` diff logic and unify naming Signed-off-by: Timo Sand <[email protected]> * Use `ConfigStateChecks` in DS tests Signed-off-by: Timo Sand <[email protected]> * Refactor to use `ConfigStateChecks` in Resource Signed-off-by: Timo Sand <[email protected]> * Comment out `owner` field for now Signed-off-by: Timo Sand <[email protected]> * Comment out `owner` field for DS as well Signed-off-by: Timo Sand <[email protected]> * Simplify import ID Signed-off-by: Timo Sand <[email protected]> * Add support for `public` field in pages Signed-off-by: Timo Sand <[email protected]> * Update docs Signed-off-by: Timo Sand <[email protected]> * Improve field descriptions Signed-off-by: Timo Sand <[email protected]> * Only modify `CNAME` in state if it has a value upstream Signed-off-by: Timo Sand <[email protected]> * Add `https_enforced` field Signed-off-by: Timo Sand <[email protected]> * Update `go-github` version Signed-off-by: Timo Sand <[email protected]> * Replace `switch` with `if` Signed-off-by: Timo Sand <[email protected]> * Re-order `d.Set` calls Signed-off-by: Timo Sand <[email protected]> * Restructure `UpdatePages` section Signed-off-by: Timo Sand <[email protected]> * Refactor tests to use `testAccConf.testRepositoryVisibility` Signed-off-by: Timo Sand <[email protected]> * Fix linter Signed-off-by: Timo Sand <[email protected]> * Add tests to ensure that `source` validation works properly Signed-off-by: Timo Sand <[email protected]> * Add more debug logging and fix validation Signed-off-by: Timo Sand <[email protected]> * Fixed validation tests to notify when they are not working Signed-off-by: Timo Sand <[email protected]> * Add comments to make it clearer why we need to use this partial value setting in Create Signed-off-by: Timo Sand <[email protected]> * Remove unnecessary `hasChanges` checks and explain the ones that are unnecessary Signed-off-by: Timo Sand <[email protected]> * Address review comments Signed-off-by: Timo Sand <[email protected]> * Reduce test time by parallelising Signed-off-by: Timo Sand <[email protected]> --------- Signed-off-by: Timo Sand <[email protected]>
austenstone
pushed a commit
to austenstone/terraform-provider-github
that referenced
this pull request
Jun 9, 2026
…ations#3168) * Add resource for repository pages and deprecate it from repository R Signed-off-by: Timo Sand <[email protected]> * Add data source for repository pages and deprecate it from repository DS Signed-off-by: Timo Sand <[email protected]> * Update formatting of docs page Signed-off-by: Timo Sand <[email protected]> * Change `github_repository` to only Read pages info if pages is in the config Signed-off-by: Timo Sand <[email protected]> * Fix faulty test Signed-off-by: Timo Sand <[email protected]> * Update Import test Signed-off-by: Timo Sand <[email protected]> * Add `repository_id` diff logic and unify naming Signed-off-by: Timo Sand <[email protected]> * Use `ConfigStateChecks` in DS tests Signed-off-by: Timo Sand <[email protected]> * Refactor to use `ConfigStateChecks` in Resource Signed-off-by: Timo Sand <[email protected]> * Comment out `owner` field for now Signed-off-by: Timo Sand <[email protected]> * Comment out `owner` field for DS as well Signed-off-by: Timo Sand <[email protected]> * Simplify import ID Signed-off-by: Timo Sand <[email protected]> * Add support for `public` field in pages Signed-off-by: Timo Sand <[email protected]> * Update docs Signed-off-by: Timo Sand <[email protected]> * Improve field descriptions Signed-off-by: Timo Sand <[email protected]> * Only modify `CNAME` in state if it has a value upstream Signed-off-by: Timo Sand <[email protected]> * Add `https_enforced` field Signed-off-by: Timo Sand <[email protected]> * Update `go-github` version Signed-off-by: Timo Sand <[email protected]> * Replace `switch` with `if` Signed-off-by: Timo Sand <[email protected]> * Re-order `d.Set` calls Signed-off-by: Timo Sand <[email protected]> * Restructure `UpdatePages` section Signed-off-by: Timo Sand <[email protected]> * Refactor tests to use `testAccConf.testRepositoryVisibility` Signed-off-by: Timo Sand <[email protected]> * Fix linter Signed-off-by: Timo Sand <[email protected]> * Add tests to ensure that `source` validation works properly Signed-off-by: Timo Sand <[email protected]> * Add more debug logging and fix validation Signed-off-by: Timo Sand <[email protected]> * Fixed validation tests to notify when they are not working Signed-off-by: Timo Sand <[email protected]> * Add comments to make it clearer why we need to use this partial value setting in Create Signed-off-by: Timo Sand <[email protected]> * Remove unnecessary `hasChanges` checks and explain the ones that are unnecessary Signed-off-by: Timo Sand <[email protected]> * Address review comments Signed-off-by: Timo Sand <[email protected]> * Reduce test time by parallelising Signed-off-by: Timo Sand <[email protected]> --------- Signed-off-by: Timo Sand <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Resolves #3167
Resolves #2671
Resolves #3142
Resolves #1045
Resolves #2653
Resolves #2335
Resolves #2087
Before the change?
github_repositoryAfter the change?
github_repository_pagesresource to manage the pagesgithub_repository_pagesdata source to fetch information about the pagesgithub_repositoryResource and Data Sourcepublicfield ofgithub_repository_pageshttps_enforcedfield ofgithub_repository_pagesPull request checklist
Schema migrations have been created if needed (example)Does this introduce a breaking change?
Please see our docs on breaking changes to help!