Skip to content

[Sprint 2] Add sandbox config template + create-sandbox script - #72

Open
thatlkat wants to merge 1 commit into
civiform:mainfrom
thatlkat:sprint2/sandbox-config
Open

[Sprint 2] Add sandbox config template + create-sandbox script#72
thatlkat wants to merge 1 commit into
civiform:mainfrom
thatlkat:sprint2/sandbox-config

Conversation

@thatlkat

@thatlkat thatlkat commented Sep 2, 2026

Copy link
Copy Markdown

What

Adds two files on top of the civiform-deploy fork for the CiviForm Demo Sandbox provisioner.

sandbox_civiform_config.sh.template

Template for per-sandbox civiform_config.sh files. Key sandbox-specific decisions baked in:

  • Auth: FAKE_IDP (STAGING_DISABLE_DEMO_MODE_LOGINS=false) — no real OIDC/ADFS needed
  • Domain: {slug}.sandbox.civiform.dev
  • SSL: Wildcard cert *.sandbox.civiform.dev (pre-provisioned once, shared — ARN passed in at create time)
  • Banner: SHOW_NOT_PRODUCTION_BANNER_ENABLED=true
  • City branding: WHITELABEL_CIVIC_ENTITY_SHORT/LONG_NAME set per sandbox
  • Notifications: All → civiform-sandbox@exygy.com (not real city addresses)

bin/create-sandbox

Script that fills in the template placeholders via sed and calls bin/setup.

bin/create-sandbox \
  --city-short="Burlington" \
  --city-full="Burlington, Vermont" \
  --slug="burlington-vt" \
  --version="v1.55.0" \
  --ssl-arn="arn:aws:acm:us-east-1:..." \
  --account-id="123456789012"

This is what EcsFargateSandboxService will call at runtime (Sprint 2). Can also be run manually for testing.

Generated configs go to configs/sandbox-{slug}.sh — gitignored.

Questions for Rocky + Sal

  1. Cloudflare: Per the deploy wiki, we need dev-services@exygy.com Cloudflare access to add DNS records for *.sandbox.civiform.dev. Sal — can you get invited?
  2. Wildcard cert: Should we request *.sandbox.civiform.dev as a wildcard (one cert, all sandboxes) or per-sandbox like the standard flow? Wildcard seems right for us.
  3. AWS account: Using single shared account (per Chelsea). Which account ID should go in --account-id?
  4. Fork: civiform-staging-deploy has forking disabled so I forked civiform-deploy instead — does this look like the right base? Rocky, LGTM on structure?

Repo

thatlkat/civiform-deploy-sandbox → transfer to civiform org once Rocky approves.

Adds two files on top of the civiform-deploy fork:

sandbox_civiform_config.sh.template
  - Template for per-sandbox civiform_config.sh files
  - Uses FAKE_IDP auth (no real OIDC/ADFS needed for demo sandboxes)
  - Wildcard SSL cert *.sandbox.civiform.dev (pre-provisioned, shared)
  - STAGING_DISABLE_DEMO_MODE_LOGINS=false (enables 1-click role switcher)
  - SHOW_NOT_PRODUCTION_BANNER_ENABLED=true
  - City branding via WHITELABEL_CIVIC_ENTITY_SHORT/LONG_NAME
  - All notifications → civiform-sandbox@exygy.com

bin/create-sandbox
  - Generates configs/sandbox-{slug}.sh from template via sed substitution
  - Validates required args + slug format
  - Calls bin/setup --config=configs/sandbox-{slug}.sh
  - Called by EcsFargateSandboxService (Sprint 2) or manually for testing

configs/sandbox-*.sh is gitignored (contains generated secrets).
configs/.gitkeep tracks the directory.

Usage:
  bin/create-sandbox \
    --city-short='Burlington' \
    --city-full='Burlington, Vermont' \
    --slug='burlington-vt' \
    --version='v1.55.0' \
    --ssl-arn='arn:aws:acm:...' \
    --account-id='123456789012'
@thatlkat
thatlkat requested a review from salg-r September 2, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant