Skip to content

Commit 6e260e9

Browse files
authored
ci: remove SOPS age workflow secret (#8)
## Summary - remove `SOPS_AGE_KEY` from the reusable OpenTofu workflow inputs/env - document AWS KMS via GitHub OIDC as the SOPS path for tfroot repos - remove README caller example passing `SOPS_AGE_KEY` ## Validation - `pre-commit run --all-files`
1 parent 58b7ba4 commit 6e260e9

3 files changed

Lines changed: 4 additions & 15 deletions

File tree

.github/workflows/opentofu.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ on:
2424
type: string
2525
default: arn:aws:iam::332355796717:role/github-actions-sops-kms
2626
secrets:
27-
SOPS_AGE_KEY:
28-
required: false
2927
SSH_PRIVATE_KEY:
3028
required: false
3129
SSH_KNOWN_HOSTS:
@@ -39,8 +37,6 @@ permissions:
3937
jobs:
4038
test:
4139
runs-on: ${{ inputs.runs-on }}
42-
env:
43-
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
4440
steps:
4541
- name: Checkout
4642
uses: actions/checkout@v4
@@ -75,8 +71,6 @@ jobs:
7571
runs-on: ${{ inputs.runs-on }}
7672
if: github.event_name == 'pull_request'
7773
needs: [test]
78-
env:
79-
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
8074
steps:
8175
- name: Checkout
8276
uses: actions/checkout@v4
@@ -130,8 +124,6 @@ jobs:
130124
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
131125
needs: [test]
132126
environment: ${{ inputs.environment }}
133-
env:
134-
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
135127
steps:
136128
- name: Checkout
137129
uses: actions/checkout@v4

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Reusable workflow for OpenTofu/Terraform root module repositories (`tfroot-*`).
3232
| `aws-region` | `us-west-2` | AWS region for SOPS KMS access |
3333
| `aws-role-to-assume` | `arn:aws:iam::332355796717:role/github-actions-sops-kms` | IAM role assumed via GitHub OIDC for SOPS KMS decrypt/encrypt |
3434

35-
Caller workflows must grant `id-token: write` permissions for OIDC. `SOPS_AGE_KEY` is optional while SOPS files retain age recipients, but the preferred path is AWS KMS via OIDC.
35+
Caller workflows must grant `id-token: write` permissions for OIDC. SOPS decryption for `tfroot-*` repos uses AWS KMS via OIDC; do not pass `SOPS_AGE_KEY` to this workflow.
3636

3737
There is no `container` input. The `arc-tf` runner pod IS the image, so adding `container:` on top would nest a container inside a container — don't do it.
3838

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ permissions:
2525
jobs:
2626
opentofu:
2727
uses: makeitworkcloud/shared-workflows/.github/workflows/opentofu.yml@main
28-
secrets:
29-
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
3028
```
3129
3230
## Available Workflows
@@ -44,7 +42,6 @@ See [images](https://github.com/makeitworkcloud/images) for container source and
4442
## Repository Setup
4543

4644
1. Grant `id-token: write` in the caller workflow so GitHub OIDC can assume the SOPS KMS role.
47-
2. Optionally add `SOPS_AGE_KEY` secret as an age fallback while SOPS files retain age recipients.
48-
3. Ensure the default `aws-role-to-assume` exists (`arn:aws:iam::332355796717:role/github-actions-sops-kms`) or pass another role ARN.
49-
4. Create caller workflow in `.github/workflows/`.
50-
5. Ensure repository has required files (e.g., `Makefile` with expected targets).
45+
2. Ensure the default `aws-role-to-assume` exists (`arn:aws:iam::332355796717:role/github-actions-sops-kms`) or pass another role ARN.
46+
3. Create caller workflow in `.github/workflows/`.
47+
4. Ensure repository has required files (e.g., `Makefile` with expected targets).

0 commit comments

Comments
 (0)