refactor(cmd): split configure_gcp.go by concern by cristim · Pull Request #2291 · LeanerCloud/cloud-commitments-cli · GitHub
Skip to content

refactor(cmd): split configure_gcp.go by concern - #2291

Merged
cristim merged 8 commits into
mainfrom
refactor/1834-split-gcp
Oct 20, 2026
Merged

cristim merged 8 commits into
mainfrom
refactor/1834-split-gcp

Conversation

@cristim

@cristim cristim commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Pure-move split of cmd/configure_gcp.go into concern-focused files (part of #1834).

Part of #1834.

AST proof: a go/ast dump of every top-level declaration with its doc comment and free-floating comments across cmd/*.go (non-test) was byte-identical to origin/main at every commit (checked after each commit). go vet ./cmd/... and go test -count=1 ./cmd/... pass.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added an interactive Google Cloud setup workflow covering authentication, project selection, service-account creation, IAM role configuration, and key creation.
    • Added support for creating or validating required custom IAM roles and granting access to the configured service account.
    • Added guided prompts for running authentication commands, confirming actions, and entering required configuration values.
    • Added automatic cleanup of temporary service-account keys after upload.
    • Improved credential validation, project discovery, and error reporting during setup.

cristim and others added 6 commits October 20, 2026 19:57
Pure move of the GCP SDK option, project listing and service-account creation helpers into configure_gcp_sdk.go. No behaviour change.

Part of #1834.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move of grantGCPIAMRole and addMemberToPolicyBinding into configure_gcp_iam.go. No behaviour change.

Part of #1834.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move of runGCPSetupCommands, gcpStepLogin and gcpStepSelectProject into configure_gcp_setup.go. No behaviour change.

Part of #1834.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move of the service-account step, existing-SA prompt and custom role helpers into configure_gcp_sa.go. No behaviour change.

Part of #1834.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move of gcpStepGrantRole and gcpStepCreateKey into configure_gcp_grant.go. No behaviour change.

Part of #1834.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move of readRequiredInputLine, promptAndRunGCPCommand and executeGCPCommand into configure_gcp_exec.go. No behaviour change.

Part of #1834.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

cristim and others added 2 commits October 20, 2026 20:28
The moved exec.Command calls live in configure_{gcp,azure}_{exec,setup}.go, so widen the per-file noctx exclusion to match.

Part of #1834.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cristim

cristim commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

@cristim
cristim merged commit e7ae236 into main Oct 20, 2026
12 checks passed
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