ci: plan cluster/scaleway via the org-wide s3-lister role over OIDC#34
Merged
Conversation
Add a federated GitHub-OIDC trust statement (sts:AssumeRoleWithWebIdentity, sub StringLike repo:IntegratedDynamic/*) so any repo in the GitHub org can assume the role keylessly — without routing through the bootstrap CI role. The existing aws:PrincipalOrgID trust is kept (the two doors coexist). Set use_name_prefix=false so the role name is exactly `s3-lister` and its ARN is stable enough to name in configure-aws-credentials. Forces a one-time role replacement, applied by the existing s3-lister-role.yml workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New workflow that assumes the org-wide s3-lister role DIRECTLY via GitHub OIDC and runs a terraform plan of cluster/scaleway. The role is read-only on S3, so the job is plan-only, -lock=false, selects the existing `infrastructure` workspace via TF_WORKSPACE (no `workspace new` write), and sets bootstrap_argocd=false (no Infisical/in-cluster providers in CI). Scaleway API refresh uses the static SCW key from secrets (Scaleway is not an OIDC RP). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The infisical provider configures (and authenticates) eagerly even with bootstrap_argocd=false, because the gated data source still pulls it into the graph. Feed valid creds via TF_VAR_infisical_client_id/secret (scaleway-env secrets) so the provider configures; no secret is read while bootstrap is off. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nbrieussel
marked this pull request as ready for review
June 15, 2026 14:37
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.
Context
Goal: a GitHub Action that reproduces, in CI, what we validated by hand — assume the org-wide
s3-listerIAM role and run aterraform planofcluster/scaleway. Per design, the role is assumed directly via GitHub OIDC (no routing through the bootstrap CI role, whose sole job is creating/updating roles).Changes
s3-lister-role/— make the role directly OIDC-assumable, org-widests:AssumeRoleWithWebIdentity,subStringLikerepo:IntegratedDynamic/*) via the module'senable_github_oidc+oidc_wildcard_subjects. Any repo in the GitHub org can assume it keylessly.aws:PrincipalOrgIDtrust is kept — both doors coexist.use_name_prefix = false→ stable names3-lister/ stable ARN (one-time role replacement, applied bys3-lister-role.yml)..github/workflows/scaleway-plan.yml— the new workflows3-listerdirectly →terraform init+planoncluster/scaleway.-lock=false,TF_WORKSPACE=infrastructure(existing workspace, no write),bootstrap_argocd=false(no Infisical/in-cluster providers in CI).SCW_*creds from secrets (Scaleway is not an OIDC relying party).cluster/scaleway/**,s3-lister-role/**, the workflow file +workflow_dispatch.Also set repo variable
AWS_S3_LISTER_ROLE_ARNto the stable ARN.Notes / review points
s3-lister-role.yml; ordering vsscaleway-planon this same PR isn't guaranteed, so the plan job may fail on the very first run (trust not yet applied). Re-run after the apply completes.bootstrap_argocd=false(cluster infra only), unlike the full local plan — a deliberate trade-off given the read-only role + no Infisical creds in CI.Test
terraform validate(s3-lister-role) ✓,actionlint✓terraform planons3-lister-roleconfirms theGithubOidcAuthstatement + name changeplan -lock=falseoncluster/scaleway) succeeded:8 to add, 0 to change, 0 to destroy