Skip to content

Group E: Google Cloud SDK (gcloud) #30

Description

@thompsonson

Standalone, cross-platform, default on. No data flag — if you apply these dotfiles you probably want gcloud.

Changes

$macosSpecific

Add:

google-cloud-sdk       # brew cask

(brew installs it as a cask; ensure the install script's cask handling path covers it.)

Linux: new run_onchange_install-gcloud-repo.sh.tmpl

Runs before the main apt install so google-cloud-cli is available to apt:

# Add Google Cloud SDK apt source + keyring (idempotent)
if [ ! -f /etc/apt/sources.list.d/google-cloud-sdk.list ]; then
  sudo install -d -m 0755 /usr/share/keyrings
  curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
    | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
  echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \
    | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list
  sudo apt-get update
fi

$linuxSpecific / $linuxWithDocker / $linuxWithoutDocker

Add google-cloud-cli.

dot_zshrc

gcloud's apt and brew installs both configure PATH + completions automatically. Nothing needed in zshrc unless we want to explicitly source the completion file — probably not necessary.

dot_local/bin/executable_sysup — doctor entries

  • tools_pm: add gcloud.
  • get_version(): case for gcloud --version | head -1.

Verification checklist

  • chezmoi execute-template renders cleanly on both platforms.
  • chezmoi apply --dry-run on a fresh Ubuntu/Pop VM shows the Google apt repo being added before apt-get install google-cloud-cli.
  • sysup doctor shows gcloud with version after apply.
  • Re-apply is a no-op (repo file already present → source-add script skips).
  • macOS: brew list --cask google-cloud-sdk shows installed after apply.

Explicit non-goals

  • No gcloud auth scaffolding — that's per-user/per-project, not dotfiles territory.
  • No opt-out flag. If machines turn up that shouldn't have gcloud, we'll add install_gcloud=true then, not pre-emptively.

Related

  • None — standalone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions