feat(resource): define Azure account and resource-group base resource types #2425

Open
opened 2026-04-03 18:01:16 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: feat/v360/azure-account-resource-group
  • Commit Message: feat(resource): define azure-subscription and azure-resource-group resource types
  • Milestone: v3.6.0
  • Parent Epic: #1019

Background

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

Currently, azure exists as a flat provider-level type inheriting from cloud-account. This issue implements the foundational Azure types: azure-subscription (the user-addable entry point, replacing the flat azure type) and azure-resource-group (the primary organizational container within a subscription).

Expected Behavior

  • azure-subscription is a user-addable resource type that inherits from cloud-account. It accepts CLI arguments for tenant ID, subscription ID, and credentials (client ID + client secret or managed identity).
  • azure-resource-group is a non-user-addable resource type that is auto-discovered as a child of azure-subscription. It inherits from cloud-region (as the closest generic structural type) or directly from cloud-account if a more appropriate base is unavailable.
  • Both types pass ResourceTypeSpec.from_config() validation.
  • Inheritance chain depth ≤ 5 levels (ADR-042).

Acceptance Criteria

  • azure-subscription resource type defined with correct inherits: cloud-account, user_addable: true, and CLI arguments (tenant-id, subscription-id, client-id, client-secret)
  • azure-resource-group resource type defined with user_addable: false, parent type azure-subscription, auto-discovered
  • Both types registered in the resource type registry
  • Both types pass ResourceTypeSpec.from_config() validation
  • Inheritance chain ≤ 5 levels deep
  • All nox stages pass
  • Coverage ≥ 97%

Dependencies

  • Blocked by: (none — this is the foundational issue)
  • Blocks: #1019

Subtasks

  • Define azure-subscription resource type YAML/config with inherits: cloud-account, user_addable: true, and CLI arguments
  • Define azure-resource-group resource type config with user_addable: false, parent azure-subscription, auto_discover: true
  • Register both types in the resource type registry
  • Validate both types pass ResourceTypeSpec.from_config() validation
  • Run nox (all default sessions), fix any errors
  • Verify coverage ≥ 97% via nox -s coverage_report

Definition of Done

  • All subtasks completed and checked off
  • azure-subscription and azure-resource-group resource types are defined, registered, and validated
  • 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/azure-account-resource-group` - **Commit Message**: `feat(resource): define azure-subscription and azure-resource-group resource types` - **Milestone**: v3.6.0 - **Parent Epic**: #1019 ## Background Epic #1019 tracks the expansion of the cloud resource hierarchy to include full Azure and DigitalOcean provider hierarchies, following the same pattern established by the generic `cloud-*` base layer and the AWS hierarchy (PR #669). Currently, `azure` exists as a flat provider-level type inheriting from `cloud-account`. This issue implements the foundational Azure types: `azure-subscription` (the user-addable entry point, replacing the flat `azure` type) and `azure-resource-group` (the primary organizational container within a subscription). ## Expected Behavior - `azure-subscription` is a user-addable resource type that inherits from `cloud-account`. It accepts CLI arguments for tenant ID, subscription ID, and credentials (client ID + client secret or managed identity). - `azure-resource-group` is a non-user-addable resource type that is auto-discovered as a child of `azure-subscription`. It inherits from `cloud-region` (as the closest generic structural type) or directly from `cloud-account` if a more appropriate base is unavailable. - Both types pass `ResourceTypeSpec.from_config()` validation. - Inheritance chain depth ≤ 5 levels (ADR-042). ## Acceptance Criteria - [ ] `azure-subscription` resource type defined with correct `inherits: cloud-account`, `user_addable: true`, and CLI arguments (`tenant-id`, `subscription-id`, `client-id`, `client-secret`) - [ ] `azure-resource-group` resource type defined with `user_addable: false`, parent type `azure-subscription`, auto-discovered - [ ] Both types registered in the resource type registry - [ ] Both types pass `ResourceTypeSpec.from_config()` validation - [ ] Inheritance chain ≤ 5 levels deep - [ ] All nox stages pass - [ ] Coverage ≥ 97% ## Dependencies - Blocked by: (none — this is the foundational issue) - Blocks: #1019 ## Subtasks - [ ] Define `azure-subscription` resource type YAML/config with `inherits: cloud-account`, `user_addable: true`, and CLI arguments - [ ] Define `azure-resource-group` resource type config with `user_addable: false`, parent `azure-subscription`, `auto_discover: true` - [ ] Register both types in the resource type registry - [ ] Validate both types pass `ResourceTypeSpec.from_config()` validation - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` ## Definition of Done - [ ] All subtasks completed and checked off - [ ] `azure-subscription` and `azure-resource-group` resource types are defined, registered, and validated - [ ] 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
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#2425
No description provided.