[Feature Request] stellar CLI for validated, guided deployments of the DDG stages
Maintainer thường phản hồi trong vòng 1 ngày
@digitalresistor đang làm issue này rồi.
Từ ngày 29/10/2026.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- HCL
- Star
- 58
- Fork
- 25
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 67
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/stellar-engine
-
Enhancement Framework - FedRAMP High Level of Effort - Low Priority - Medium Scope - Blueprint Scope - Module
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
google/stellar-engine#320 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement] blueprints/il5, fedramp-high: scope project-wide IAM bindings to resources, wire CMEK, and restrict firewall targetsCó thể đã có người làm @LeonxLJX đã nhận 1 ngày trước. Đang mởEnhancement Framework - FedRAMP High Framework - IL5 Level of Effort - Medium Priority - Medium Scope - Blueprint Security
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
google/stellar-engine#374 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] blueprints/il5, fedramp-high: fix broken Terraform references, service account ID length limits, and GitLab HTTP listenerCó thể đã có người làm @LeonxLJX đã nhận 1 ngày trước. Đang mởBug Framework - FedRAMP High Framework - IL5 Level of Effort - Medium Priority - High Scope - Blueprint Security
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
google/stellar-engine#373 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] modules/access-context-manager, beyondcorp: evaluate all access level conditions and enforce endpoint verificationCó thể đã có người làm @LeonxLJX đã nhận 1 ngày trước. Đang mởBug Framework - FedRAMP High Framework - IL5 Level of Effort - Low Priority - Medium Scope - Module Security
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
google/stellar-engine#372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] fast/stages-aw/3-security, scripts: fix cross-env KMS admin grant, VPC-SC dry-run status, and script input handlingCó thể đã có người làm @LeonxLJX đã nhận 1 ngày trước. Đang mởBug Framework - FedRAMP High Framework - IL5 Level of Effort - Low Priority - High Scope - Fast Security
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
google/stellar-engine#371 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của google/stellar-engine
Issue tương tự
-
agent-ready area:cache bug p3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
gacela-project/gacela#1027 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
CommandCodeAI/command-code#1088 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
VRAM estimate: a PRM step is charged the cross-entropy chain it never buildsCó thể đã có người làm @ybai08 đã nhận hôm nay. Đang mởarea:training claimed difficulty:3 enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MakazhanAlpamys/Soup#2332 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/openserverless#282 · 2 bình luận ·
-
Dokumentasjon på nais defaultsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày