Skip to content

Fix/aws static site cli and dnszone#283

Merged
smecsia merged 2 commits into
mainfrom
fix/aws-static-site-cli-and-dnszone
May 20, 2026
Merged

Fix/aws static site cli and dnszone#283
smecsia merged 2 commits into
mainfrom
fix/aws-static-site-cli-and-dnszone

Conversation

@universe-ops
Copy link
Copy Markdown
Contributor

Two independent bugs in the AWS static-website path; both surfaced on the landing / forge-landing stacks after simple-container-com/landing@374bce6 switched them to template: static-site.

1. aws-cli missing from simplecontainer/github-actions runner image

pkg/clouds/pulumi/aws/static_website.go:174 shells out to aws s3 sync via Pulumi local.NewCommand, but neither Dockerfile installed the AWS CLI — every static-site stack run under the image failed with /bin/sh: aws: not found. Example: https://github.com/simple-container-com/landing/actions/runs/26192421479

  • Adds Alpine aws-cli (community repo) to the runtime layer of github-actions.Dockerfile and github-actions-staging.Dockerfile.
  • Extends the build-time smoke test to run aws --version.

2. baseDnsZone ignored for AWS static-site stacks (Cloudflare appends parent zone)

aws.StaticSiteInput embeds api.StackConfigStatic (which carries Site.BaseDnsZone) but never implemented the api.DnsConfigAware interface, so the assertion at pkg/clouds/pulumi/deploy.go:142 fell through. The Cloudflare registrar then fell back to the parent stack's default cfg.ZoneName (simple-container.com) — Cloudflare appended that suffix, turning intended apex records into simple-forge.com.simple-container.com.

  • Adds OverriddenBaseZone() on aws.StaticSiteInput, returning i.Site.BaseDnsZone. Restores parity with gcloud.StaticSiteInput, aws.LambdaInput, aws.EcsFargateInput.

Test plan

  • Build github-actions-staging.Dockerfile locally → new smoke step prints aws version
  • Push to stagingbuild-staging.yml promotes the image
  • Re-run https://github.com/simple-container-com/landing/actions/runs/26192421479 (or push to landing's main) — aws s3 sync succeeds under the action runner
  • Re-deploy forge-landing / landing → Cloudflare record name stays at the apex (e.g. simple-forge.com), no parent-zone suffix
  • Rotate the AWS IAM key that was leaked in plaintext in the failed run's log

🤖 Generated with Claude Code

universe-ops and others added 2 commits May 21, 2026 01:30
`pkg/clouds/pulumi/aws/static_website.go` shells out to `aws s3 sync`
via Pulumi `local.NewCommand`, but neither the prod nor staging
Dockerfile installed the AWS CLI — every static-site stack run under
the simplecontainer/github-actions image failed with
`/bin/sh: aws: not found`.

Adding the alpine `aws-cli` package (community repo, python-based)
to the runtime layer of both images + extending the build-time
smoke test to cover `aws --version`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ured

aws.StaticSiteInput embeds api.StackConfigStatic (which carries Site.
BaseDnsZone) but never exposed an OverriddenBaseZone() method, so the
type assertion in pulumi/deploy.go fell through and the Cloudflare
registrar fell back to the parent stack's default zone. Records
intended for e.g. simple-forge.com landed in the simple-container.com
zone and Cloudflare appended the suffix → simple-forge.com.simple-
container.com.

GCP, Lambda and ECS Fargate inputs already implement the interface;
this just restores parity.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Security Scan Results

Repository: api | Commit: a115a28

Check Status Details
✅ Secret Scan Pass No secrets detected
✅ Dependencies (Trivy) Pass 0 total (no critical/high)
✅ Dependencies (Grype) Pass 0 total (no critical/high)
📦 SBOM Generated 528 components (CycloneDX)

Scanned at 2026-05-20 22:34 UTC

@github-actions
Copy link
Copy Markdown

Semgrep Scan Results

Repository: api | Commit: a115a28

Check Status Details
⚠️ Semgrep Warning 10 warning(s), 10 total

Scanned at 2026-05-20 22:34 UTC

@smecsia smecsia merged commit b372b18 into main May 20, 2026
46 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants