Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0
- uses: sourceplane/orun-action@v1.2.0
with:
version: v2.20.0
version: v2.39.0
- env:
# Surface the best-effort catalog auto-sync (execution.state.autopushCatalog).
# A successful push prints "✓ pushed catalog …"; ORUN_VERBOSE also makes
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- uses: sourceplane/orun-action@v1.2.0
with:
version: v2.20.0
version: v2.39.0
- run: |
orun run \
--plan plan.json \
Expand All @@ -90,11 +90,19 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CLOUDFLARE_API_TOKEN is now an orun-managed brokered secret
# (secret://lumen/lumen/<env>/CLOUDFLARE_API_TOKEN, minted fresh per
# run from the Cloudflare integration): worker deploys receive it via
# the deploy profile's secretBindings, cloudflare-kv via its
# component secretEnv — the resolved value overrides this ambient one.
# The ambient copy remains ONLY for cloudflare-hyperdrive and
# cloudflare-domain, whose Terraform needs Hyperdrive/DNS permissions
# the workers-deploy broker template does not mint yet. Remove it when
# those two components migrate.
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
SUPABASE_API_KEY: ${{ secrets.SUPABASE_API_KEY }}
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_API_KEY }}
TF_VAR_cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
TF_VAR_cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# Supabase org id is environment/account-specific, so it comes from a
# CI secret rather than a committed component parameter. Used by the
Expand Down
37 changes: 23 additions & 14 deletions infra/terraform/cloudflare-domain/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,28 @@ spec:
dependsOn:
- component: web-console-next

# PARKED — no environment subscriptions, so no jobs are planned. The zone
# this stack manages (baseDomain lumen.app) is not delegated to Cloudflare
# and does not exist in the connected account (the domain is parked at
# dns.ws — a rebrand artifact), so `data.cloudflare_zone.existing` fails
# every plan with "no zone found". Restore the subscribe block below once
# the zone exists in the account (and finish the 0085b v5 re-import).
#
# subscribe:
# environments:
# - name: stage
# profile: plan-only
# profileRules:
# - profile: apply
# when:
# triggerRef: github-push-main
#
# - name: prod
# profile: plan-only
# profileRules:
# - profile: apply
# when:
# triggerRef: github-push-main
subscribe:
environments:
- name: stage
profile: plan-only
profileRules:
- profile: apply
when:
triggerRef: github-push-main

- name: prod
profile: plan-only
profileRules:
- profile: apply
when:
triggerRef: github-push-main
environments: []
# ci: trigger full-component verification (orun v2.12.0 upgrade — PR #183)
14 changes: 4 additions & 10 deletions infra/terraform/cloudflare-domain/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ provider "aws" {
}
}

provider "cloudflare" {
api_token = var.cloudflare_api_token
}
# Authenticates via the CLOUDFLARE_API_TOKEN env var (provider-native): the
# token is an orun-managed secret resolved into the job env at run time, so it
# never transits Terraform variables.
provider "cloudflare" {}

# --- Variables (standard Orun parameters) ---

Expand All @@ -45,13 +46,6 @@ variable "awsRegion" {
default = "us-east-1"
}

variable "cloudflare_api_token" {
type = string
sensitive = true
default = ""
description = "Cloudflare API token (from CLOUDFLARE_API_TOKEN env var)"
}

variable "cloudflare_account_id" {
type = string
sensitive = true
Expand Down
15 changes: 4 additions & 11 deletions infra/terraform/cloudflare-hyperdrive/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ provider "aws" {
}
}

# Authenticates via CLOUDFLARE_API_TOKEN env var
provider "cloudflare" {
api_token = var.cloudflare_api_token
}
# Authenticates via the CLOUDFLARE_API_TOKEN env var (provider-native): the
# token is an orun-managed secret resolved into the job env at run time, so it
# never transits Terraform variables.
provider "cloudflare" {}

# --- Variables (standard Orun parameters) ---

Expand All @@ -46,13 +46,6 @@ variable "awsRegion" {
default = "us-east-1"
}

variable "cloudflare_api_token" {
type = string
sensitive = true
default = ""
description = "Cloudflare API token with Hyperdrive permissions (from CLOUDFLARE_API_TOKEN env var)"
}

variable "cloudflare_account_id" {
type = string
sensitive = true
Expand Down
1 change: 0 additions & 1 deletion infra/terraform/cloudflare-kv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Standard Orun parameters (matching `cloudflare-hyperdrive`):
| Name | Type | Default | Description |
|---|---|---|---|
| `awsRegion` | string | `us-east-1` | AWS region for Terraform state backend |
| `cloudflare_api_token` | string (sensitive) | `""` | From `CLOUDFLARE_API_TOKEN` env var |
| `cloudflare_account_id` | string (sensitive) | `""` | From `CLOUDFLARE_ACCOUNT_ID` env var |
| `orgName` | string | `lumen` | Org identifier |
| `owner` | string | `lumen` | GitHub owner |
Expand Down
6 changes: 6 additions & 0 deletions infra/terraform/cloudflare-kv/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ spec:
env:
AWS_EC2_METADATA_DISABLED: "true"

# The Cloudflare Terraform provider authenticates via the CLOUDFLARE_API_TOKEN
# env var, resolved by orun from the project-rung brokered secret (fresh per
# run, Deploy Workers scope). Declared at component level because plan-only
# lanes refresh against the live Cloudflare API too, not just apply.
secretEnv:
CLOUDFLARE_API_TOKEN: "secret://lumen/lumen/{{ .environment }}/CLOUDFLARE_API_TOKEN"

subscribe:
environments:
Expand Down
15 changes: 4 additions & 11 deletions infra/terraform/cloudflare-kv/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ provider "aws" {
}
}

# Authenticates via CLOUDFLARE_API_TOKEN env var
provider "cloudflare" {
api_token = var.cloudflare_api_token
}
# Authenticates via the CLOUDFLARE_API_TOKEN env var (provider-native): the
# token is an orun-managed secret resolved into the job env at run time, so it
# never transits Terraform variables.
provider "cloudflare" {}

# --- Variables (standard Orun parameters) ---

Expand All @@ -46,13 +46,6 @@ variable "awsRegion" {
default = "us-east-1"
}

variable "cloudflare_api_token" {
type = string
sensitive = true
default = ""
description = "Cloudflare API token with Workers KV permissions (from CLOUDFLARE_API_TOKEN env var)"
}

variable "cloudflare_account_id" {
type = string
sensitive = true
Expand Down
2 changes: 1 addition & 1 deletion intent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ compositions:
# a commit here. Bumping the tag is the deliberate upgrade step.
- name: stack-tectonic
kind: oci
ref: oci://ghcr.io/sourceplane/stack-tectonic:0.13.0
ref: oci://ghcr.io/sourceplane/stack-tectonic:0.14.0
resolution:
precedence:
- stack-tectonic
Expand Down
Loading