astroctl cloud gcp selfHosted cleanup
Remove GCP resources created by setup
Synopsis
Remove the GCP resources that 'astroctl cloud gcp selfHosted setup' created for a cluster, by the names setup gave them, and the credentials stored for it in AstroPulse.
This deletes:
Terminal
- The role bindings setup granted the service account
- The service account and every key it has
- The GCS bucket and its contents
- The key file setup wrote (~/.astropulse/credentials/my-project.json)
- The credentials stored in AstroPulse for the cluster; when they cannot be
removed, cleanup still removes the GCP resources, then exits non-zero and
names the command that removes them
The service account and bucket are deleted only when setup created them for this cluster; anything else by that name is kept. The project comes from the cluster's recorded setup; pass --project-id when none is recorded any more. --service-account and --bucket replace the names setup used.
Terminal
astroctl cloud gcp selfHosted cleanup [flags]
Examples
Terminal
# Remove what setup created for cluster prod
astroctl cloud gcp selfHosted cleanup --cluster-name prod
# Just show the commands
astroctl cloud gcp selfHosted cleanup --cluster-name prod --show-commands
# No setup recorded any more: name the project
astroctl cloud gcp selfHosted cleanup --cluster-name prod --project-id my-proj
Options
Terminal
--bucket string GCS bucket to remove instead of the one setup created
--cluster-name string Cluster name the setup was for (required)
-h, --help help for cleanup
--project-id string GCP project ID (default: the project of the cluster's recorded setup)
--service-account string Service account email to remove instead of the one setup created
--show-commands Print the commands and exit
Options inherited from parent commands
Terminal
-o, --output string Output format (table|json|yaml) (default "table")
SEE ALSO
- astroctl cloud gcp selfHosted - Self-hosted cluster prerequisite management