Skip to content

Feature/add more methods#38

Open
ErraticO wants to merge 5 commits intodevelopfrom
feature/add-more-methods
Open

Feature/add more methods#38
ErraticO wants to merge 5 commits intodevelopfrom
feature/add-more-methods

Conversation

@ErraticO
Copy link
Copy Markdown
Collaborator

@ErraticO ErraticO commented Apr 21, 2026

Summary

This PR adds full GCP infrastructure teardown support via a new --delete CLI command, and improves VM image baking performance through parallelization.

Changes

--delete CLI command (gcp_cli.py, infra.py)

  • Added --delete flag to the GCP infra CLI to tear down all provisioned resources
  • Implemented delete() orchestration in infra.py covering the full resource lifecycle

Resource-level delete() methods (artifacts.py, iam.py, pre_vm_image.py)

  • Added delete() to Artifacts, IAM, and PreVMImage classes to support granular teardown

CloudKMS delete & re-create handling (kms.py)

  • Added delete(), describe_enabled_key_version(), and create_key_version() to CloudKMS
  • On re-create after delete, detects missing enabled key versions and creates a new one instead of failing on the existing keyring/key
  • Replaced create_key_version with enable_primary_key_version to restore and re-enable the existing primary key version, avoiding unnecessary version proliferation

Parallelized VM image baking (infra.py, pre_vm_image.py)

  • CPU and GPU VM image baking now run in parallel, reducing total provisioning time

…) to CloudKMS


Handles re-create after delete by detecting missing enabled versions and
creating a new key version instead of failing on existing keyring/key.
Restore and re-enable the primary key version instead of creating a new
one, avoiding unnecessary version proliferation after delete/re-create.
@ErraticO ErraticO force-pushed the feature/add-more-methods branch from 17d6684 to f5bc18b Compare April 21, 2026 07:59
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