feat(resource): define GCP cloud resource hierarchy (gcp-project, gcp-region, gcp-vpc, gcp-gce-instance, gcp-gcs-bucket) #2442

Open
opened 2026-04-03 18:22:31 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: feat/v360/gcp-resource-hierarchy
  • Commit Message: feat(resource): define GCP resource type hierarchy (gcp-project through gcp-gcs-bucket)
  • Milestone: v3.6.0
  • Parent Epic: #1019

Background

Epic #1019 tracks the expansion of the cloud resource hierarchy to include full Azure, DigitalOcean, and GCP provider hierarchies, following the same pattern established by the generic cloud-* base layer and the AWS hierarchy (PR #669).

Currently, gcp exists as a flat provider-level type inheriting from cloud-account. It needs to be expanded into a full hierarchy following the same pattern as AWS, Azure, and DigitalOcean.

Expected Behavior

The GCP provider hierarchy should replace the flat gcp type with a structured hierarchy of ≥15 types:

Type Inherits From Description
gcp-project cloud-account GCP project (top-level billing/IAM boundary)
gcp-region cloud-region GCP region (e.g., us-central1)
gcp-zone cloud-zone GCP availability zone (e.g., us-central1-a)
gcp-vpc cloud-network GCP Virtual Private Cloud network
gcp-subnet cloud-subnet GCP VPC subnet
gcp-firewall-rule cloud-security-group GCP VPC firewall rule
gcp-gce-instance cloud-compute-instance Google Compute Engine VM instance
gcp-gcs-bucket cloud-object-store Google Cloud Storage bucket
gcp-persistent-disk cloud-block-storage GCP persistent disk
gcp-iam-service-account cloud-iam-role GCP IAM service account
gcp-iam-binding cloud-iam-policy GCP IAM role binding
gcp-cloud-run-service cloud-serverless-function GCP Cloud Run service
gcp-gke-cluster cloud-container-cluster GCP Google Kubernetes Engine cluster
gcp-artifact-registry cloud-container-registry GCP Artifact Registry repository
gcp-pubsub-topic cloud-message-queue GCP Pub/Sub topic
gcp-cloud-sql-instance cloud-database GCP Cloud SQL managed database

Acceptance Criteria

  • ≥15 GCP resource types are defined following the generic base inheritance pattern
  • All types pass ResourceTypeSpec.from_config() validation
  • Inheritance chains are ≤ 5 levels deep (ADR-042)
  • The flat gcp type is replaced by gcp-project (or deprecated with a migration note)
  • BDD feature tests added for the GCP provider hierarchy
  • docs/specification.md updated with the new GCP provider table
  • All nox stages pass
  • Coverage >= 97%

Subtasks

  • Define gcp-project and gcp-region/gcp-zone base types in the resource type registry
  • Define GCP networking types: gcp-vpc, gcp-subnet, gcp-firewall-rule
  • Define GCP compute types: gcp-gce-instance, gcp-persistent-disk
  • Define GCP storage types: gcp-gcs-bucket
  • Define GCP IAM types: gcp-iam-service-account, gcp-iam-binding
  • Define GCP container/serverless types: gcp-cloud-run-service, gcp-gke-cluster, gcp-artifact-registry
  • Define GCP messaging/data types: gcp-pubsub-topic, gcp-cloud-sql-instance
  • Deprecate or replace the flat gcp type with gcp-project
  • Add BDD scenarios for GCP resource type validation and hierarchy traversal
  • Update docs/specification.md with the GCP provider table
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Dependencies

  • Blocked by: #2425 (Azure base types must be established first as a pattern reference)
  • Blocks: #1019 (Epic)

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • ≥15 GCP resource types are defined and validated.
  • The flat gcp type is replaced or deprecated.
  • BDD tests cover the GCP hierarchy.
  • docs/specification.md is updated.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: Unknown | Agent: ca-epic-planner

## Metadata - **Branch**: `feat/v360/gcp-resource-hierarchy` - **Commit Message**: `feat(resource): define GCP resource type hierarchy (gcp-project through gcp-gcs-bucket)` - **Milestone**: v3.6.0 - **Parent Epic**: #1019 ## Background Epic #1019 tracks the expansion of the cloud resource hierarchy to include full Azure, DigitalOcean, and GCP provider hierarchies, following the same pattern established by the generic `cloud-*` base layer and the AWS hierarchy (PR #669). Currently, `gcp` exists as a flat provider-level type inheriting from `cloud-account`. It needs to be expanded into a full hierarchy following the same pattern as AWS, Azure, and DigitalOcean. ## Expected Behavior The GCP provider hierarchy should replace the flat `gcp` type with a structured hierarchy of ≥15 types: | Type | Inherits From | Description | |------|--------------|-------------| | `gcp-project` | `cloud-account` | GCP project (top-level billing/IAM boundary) | | `gcp-region` | `cloud-region` | GCP region (e.g., `us-central1`) | | `gcp-zone` | `cloud-zone` | GCP availability zone (e.g., `us-central1-a`) | | `gcp-vpc` | `cloud-network` | GCP Virtual Private Cloud network | | `gcp-subnet` | `cloud-subnet` | GCP VPC subnet | | `gcp-firewall-rule` | `cloud-security-group` | GCP VPC firewall rule | | `gcp-gce-instance` | `cloud-compute-instance` | Google Compute Engine VM instance | | `gcp-gcs-bucket` | `cloud-object-store` | Google Cloud Storage bucket | | `gcp-persistent-disk` | `cloud-block-storage` | GCP persistent disk | | `gcp-iam-service-account` | `cloud-iam-role` | GCP IAM service account | | `gcp-iam-binding` | `cloud-iam-policy` | GCP IAM role binding | | `gcp-cloud-run-service` | `cloud-serverless-function` | GCP Cloud Run service | | `gcp-gke-cluster` | `cloud-container-cluster` | GCP Google Kubernetes Engine cluster | | `gcp-artifact-registry` | `cloud-container-registry` | GCP Artifact Registry repository | | `gcp-pubsub-topic` | `cloud-message-queue` | GCP Pub/Sub topic | | `gcp-cloud-sql-instance` | `cloud-database` | GCP Cloud SQL managed database | ## Acceptance Criteria - [ ] ≥15 GCP resource types are defined following the generic base inheritance pattern - [ ] All types pass `ResourceTypeSpec.from_config()` validation - [ ] Inheritance chains are ≤ 5 levels deep (ADR-042) - [ ] The flat `gcp` type is replaced by `gcp-project` (or deprecated with a migration note) - [ ] BDD feature tests added for the GCP provider hierarchy - [ ] `docs/specification.md` updated with the new GCP provider table - [ ] All nox stages pass - [ ] Coverage >= 97% ## Subtasks - [ ] Define `gcp-project` and `gcp-region`/`gcp-zone` base types in the resource type registry - [ ] Define GCP networking types: `gcp-vpc`, `gcp-subnet`, `gcp-firewall-rule` - [ ] Define GCP compute types: `gcp-gce-instance`, `gcp-persistent-disk` - [ ] Define GCP storage types: `gcp-gcs-bucket` - [ ] Define GCP IAM types: `gcp-iam-service-account`, `gcp-iam-binding` - [ ] Define GCP container/serverless types: `gcp-cloud-run-service`, `gcp-gke-cluster`, `gcp-artifact-registry` - [ ] Define GCP messaging/data types: `gcp-pubsub-topic`, `gcp-cloud-sql-instance` - [ ] Deprecate or replace the flat `gcp` type with `gcp-project` - [ ] Add BDD scenarios for GCP resource type validation and hierarchy traversal - [ ] Update `docs/specification.md` with the GCP provider table - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Dependencies - Blocked by: #2425 (Azure base types must be established first as a pattern reference) - Blocks: #1019 (Epic) ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - ≥15 GCP resource types are defined and validated. - The flat `gcp` type is replaced or deprecated. - BDD tests cover the GCP hierarchy. - `docs/specification.md` is updated. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: Unknown | Agent: ca-epic-planner
freemo added this to the v3.6.0 milestone 2026-04-03 18:22:38 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Important spec requirement or quality improvement. Should be included in the milestone if possible.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Important spec requirement or quality improvement. Should be included in the milestone if possible. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#2442
No description provided.