feat: support use_immutable_subject and sub_claim_prefix on repository OIDC subject claim template - #3582
Open
madriaanse377 wants to merge 1 commit into
Conversation
…y OIDC subject claim template Wires the use_immutable_subject and sub_claim_prefix fields (already present on go-github v89's OIDCSubjectClaimCustomTemplate struct) through the github_actions_repository_oidc_subject_claim_customization_template resource, allowing existing repositories to opt into GitHub's immutable OIDC subject claim format on a per-repository basis without an org-wide change. Closes integrations#3548
|
👋 Hi, and thank you for this contribution! This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can. You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions. 🤖 This is an automated message. |
Contributor
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.


Summary
Wires
use_immutable_subjectandsub_claim_prefix— already present on go-github v89'sOIDCSubjectClaimCustomTemplatestruct — through togithub_actions_repository_oidc_subject_claim_customization_template.This lets a repository created before GitHub's July 15, 2026 immutable-subject-claims rollout opt in individually via Terraform, instead of requiring an org-wide toggle or an out-of-band REST call that Terraform can't track.
Changes
use_immutable_subject(bool, optional, computed) andsub_claim_prefix(string, optional, computed) added to the resource schemaCreateOrUpdateandRead, following the existingGetOk+new(...)pattern already used elsewhere in this resource (include_claim_keys) and in sibling resources (e.g.resource_github_enterprise_actions_workflow_permissions.go)docs/resources/...mdand its.tmplsource) and the example underexamples/resources/...updated to cover both new argumentsScoped to the repository-level resource only, matching the issue — the organization-level resource and this resource's
Deletebehavior are unchanged.Closes #3548
Test plan
TestAccGithubActionsRepositoryOIDCSubjectClaimCustomizationTemplate), since these require a live GitHub token this environment doesn't haveuse_default/include_claim_keysandcan_approve_pull_request_reviewspatterns for consistency