[Feature Request] stellar CLI for validated, guided deployments of the DDG stages
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start with the merged cli/ scaffold and docs/ddg.md, then review the listed stage inputs, including setIAM.yaml.sample, enableServices.sh, and the fast/stages-aw/ variables. The progress checklist breaks the work into pull requests, but this issue tracks a broad design with open stakeholder questions. Done means completing the remaining CLI phases and guide updates, with tested deployment and teardown flows.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Feature Description
The stellar command line tool, under the cli/ directory, guides an operator through the Detailed Deployment Guide in the docs/ddg.md file from prerequisites to a finished Stage 3. It replaces the manual copy, edit and paste flow and the experimental scripts/deploy.sh and scripts/destroy.sh scripts with one tested tool.
- It validates every prerequisite before anything changes, with an exact fix for each gap.
- It collects the deployment answers once and generates the
terraform.tfvarsfile for every stage underfast/stages-aw/. - It explains or runs each DDG step in order, with review gates before risky changes and resume after a failure.
- It tears a deployment down safely, scoped to the deployment's prefix.
This issue tracks the design, the progress, and the open questions, so stakeholders can follow and discuss the work in one place.
Use Case
Deploying Stellar Engine today takes roughly 60 manual steps, and several of them fail in ways that only surface partway through Terraform.
- Operators hand-edit
terraform.tfvarsfrom the samples, copy provider and*.auto.tfvars.jsonfiles out of Cloud Storage, and run a two-pass Stage 0 with a state migration. - Conditional workarounds live in prose, such as the BigQuery
restrictServiceUsageerror, external billing grants, and the missing KMS service agent. - The
scripts/deploy.shscript generates tfvars only for Stage 0 and Stage 1, has no unit tests, and exits successfully on failure, as fixed in #303. - The samples, the guide and the code have drifted apart. For example, the Stage 0
kms_protection_levelvariable has no default, and the guide lists the wrong Terraform version and script name. - Stage 0 manages several organization roles authoritatively, so its first apply silently removes existing grants. In a shared organization this can remove access that other teams and platform automation depend on.
- Operators copy the whole repository for each environment and edit it in place, so each copy drifts and misses upstream fixes.
- A deleted project keeps its ID for 30 days, so redeploying an environment with the same prefix fails, as #50 describes.
Proposed Solution
Design principles
- The tool reads facts from the repository instead of copying them. Role, API, group, log sink, custom role and constraint lists come from
setIAM.yaml.sample,enableServices.shand the Stage 0 variables, and sync tests fail when the guide and the code drift apart. - The
terraform.tfvars.samplefiles stay the single source for defaults such as log sinks, firewall rules and DNS policy rules. - Checks only read. Changes go through a plan, a summary and an explicit approval.
- Each environment lives in its own directory, so one checkout can manage several deployments, and each records the code version it was deployed from.
- The
cli/project is a self-contained uv project that follows the Google Python Style Guide, with unit tests that use in-memory fakes and never touch the network.
Commands
| Command | Purpose |
|---|---|
stellar preflight |
Validate the guide's prerequisites, read-only. |
stellar init |
Collect the deployment answers once in a wizard, or seed them from another environment with --answers-from. |
stellar env list, env use, env show |
List the environments of a home folder, pick the current one, and show its derived names, imports, and Stage 0 phase. |
stellar render |
Build each stage workspace and generate its terraform.tfvars file, import blocks, and Stage 0 phase file with overwrite safety. |
stellar imports scan |
Record the organization policies that exist before Stage 0, so the final Stage 0 apply imports them in place of the import.sh script. |
stellar guide |
Show each DDG step with the exact commands for this deployment. |
stellar deploy |
Run the DDG steps with review gates, retries for known errors, and resume. |
stellar status |
Show which steps are done, verified against real state. |
stellar backup |
Store or restore an environment's answers and state in an encrypted bundle. |
stellar destroy |
Tear down one deployment, scoped to its prefix. |
New environments from existing answers
The stellar init --answers-from <environment> option starts a new environment from another one's answers, so moving from a FedRAMP Moderate test to a DoD IL4 test takes a few keystrokes.
- Every carried value becomes a prompt default, so pressing Enter accepts it and the operator changes only what differs.
- Values that depend on the regime, such as the KMS protection level and the Stage 2 networking flavor, follow the new regime unless the operator set them explicitly.
- A carried value that the new regime rejects, such as an unsupported region, is asked again.
- Run state, logs and the prefix never carry over. The
--new-prefixoption suggests a fresh prefix, which addresses #50 without random suffixes in Terraform, because.gemini/styleguide.mdasks for deterministic prefix tokens. - Preflight also reports soft-deleted projects that still hold the IDs Stage 0 would create.
Organization IAM safety
- Preflight lists every existing grant that the first Stage 0 apply would remove, role by role.
- Before that apply,
stellar deploysnapshots the organization IAM policy and shows a removal review that needs typed confirmation. The operator can skip the gate, and the tool records the skip. - Terraform can run as a service account while a named user fills the Stage 0
bootstrap_uservariable.
Progress
Each pull request is self-contained and reviewable on its own.
-
stellar preflight, the CLI scaffold, its CI job, and the guide's instructions to run it, merged in #305 -
stellar initandstellar renderfor Stage 0 and Stage 1, with per-environment directories,--answers-from, and--new-prefixfor #50, merged in #357- #357 also adds
stellar env,stellar imports scan, import blocks for pre-created projects and Assured Workloads workloads, and a CLI-owned Stage 0 phase file that replaces-var bootstrap_user. - A lab Stage 0 deployment with these workspaces applied, migrated to the remote state bucket, and plans no changes.
- #357 also adds
-
stellar renderfor both Stage 2 networking flavors and Stage 3, with CIDR overlap validation -
stellar backupand restore -
stellar guide,stellar deployandstellar status, with the IAM review gate and known-error remediation -
stellar destroy - Guide updates that make
stellarthe primary flow, and deprecation ofscripts/deploy.shandscripts/destroy.sh
Related fixes found while building the tool:
- #303 makes
scripts/deploy.shexit on failure and honor "no" and "skip" answers until the tool replaces it. - #301 derives the IL5 NGFW landing gateway from the configured region, because IL5 is available in more regions than
us-east4. - #300 matches the
fast/stage-links.shimpersonation patterns to the real stage service account names. - #302 proposes ruff and the Google Python Style Guide repository-wide, tracked in #304.
- #355 lets Stage 0 adopt pre-created projects and an Assured Workloads workload, which #357 uses.
- #356 stops the preflight folder check from counting deleted folders.
- #358 drops the
size()guard that IAM rejects from the delegated grant conditions. - #359 passes the folder number to the folder logging settings.
- #361 lets the Stage 0 folders inherit the organization logging settings under regimes that enforce CMEK for Logging.
- #362 fixes a flaky
generate_idtest.
Compliance & Deployment Context
- Target Deployment Type(s):
- US Region Restricted (e.g., Access Policy constraint)
- FedRAMP Medium
- FedRAMP High
- FedRAMP Moderate
- DoD IL4
- DoD IL5
- All / General
- Relevant NIST 800-53r5 Controls: CM-2 and CM-6, because the tool generates a consistent baseline configuration for every stage. AC-2 and AC-6, because preflight and the review gate surface organization IAM changes before Stage 0 applies them.
Reusability Check
Stellar Engine prioritizes reusability.
- I have checked if this functionality can be achieved by extending an existing module or blueprint.
- I have verified that this does not duplicate existing functionality.
The tool reuses the existing stages, samples and helper data unchanged. It replaces scripts/deploy.sh rather than adding a second deployer next to it.
Alternatives Considered
- Extending
scripts/deploy.shkeeps the flow in Bash, which makes tfvars generation for nested stage inputs and unit testing hard. - A standard-library-only Python script avoids dependencies but would parse gcloud text output instead of calling the Google Cloud client libraries.
- Terragrunt could manage per-environment configuration and pinned versions. Its evaluation is part of the future work below, because it overlaps with how FAST already passes outputs between stages through Cloud Storage.
Additional Context
This issue extends #49, which asked to automate the UPDATE_ME substitution in backend.tf files. That placeholder no longer exists, because stages now download generated provider files, and stellar deploy covers the remaining Stage 0 automation.
Open questions for stakeholders:
- Should Stage 0 offer an opt-in additive IAM mode for shared or lab organizations, while production keeps the authoritative default?
- Should a later phase support one canonical, unmodified checkout that deploys several pinned environments and upgrades them in place, and should that use the tool's own environment directories or Terragrunt?
- Is a fully non-interactive
stellar deploy --yesmode for repeatable test runs wanted?
- Lenguaje dominante
- HCL
- Estrellas
- 58
- Forks
- 25
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 62
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/stellar-engine
-
Enhancement Framework - FedRAMP High Level of Effort - Low Priority - Medium Scope - Blueprint Scope - Module
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
google/stellar-engine#320 ·
Los mantenedores suelen responder en 1 día
-
Enhancement Level of Effort - Medium Priority - Medium Scope - Blueprint Scope - Fast Scope - Module
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
google/stellar-engine#321 ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Sync the repository tooling under tools/ from upstream Cloud Foundation FabricPosiblemente ocupada @digitalresistor la tomó hace 7 días. AbiertoDocumentation Enhancement Level of Effort - Medium Priority - Medium Scope - Module
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
google/stellar-engine#319 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] fedramp-high/gitlab: GKE control plane authorized ranges and node settings are silently ignoredPosiblemente ocupada @digitalresistor la tomó hace 7 días. AbiertoBug Framework - FedRAMP High Level of Effort - Low Priority - High Scope - Blueprint Scope - Module Security
Dificultad 4/5 1-2 días Aptitud para principiantes 57/100
google/stellar-engine#314 ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Sync the modules from upstream Cloud Foundation Fabric and keep them currentPosiblemente ocupada @digitalresistor la tomó hace 7 días. AbiertoDocumentation Enhancement Level of Effort - High Priority - Medium Scope - Module
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
google/stellar-engine#308 ·
Los mantenedores suelen responder en 1 día
Todos los issues de google/stellar-engine
Issues similares
-
component:benchmark
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
agentic-os-org/ANOLISA#9177 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
argus-code-scanning/argus-codescan-mcp#113 ·
Los mantenedores suelen responder en 1 día
-
agent:working bug follow-up lane:auto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Sanne/incus-spawn#1765 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
date parser raises AttributeError instead of ParseError on formats it cannot parse (date -I, non-C locales)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
kellyjonbrazil/jc#847 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
mpfaffenberger/code_puppy#1072 ·
Los mantenedores suelen responder en 1 día