Resource (kind: resource)
A discrete, provisionable cloud artifact — a VM, storage account, database, etc. Declares its
provider type/resource type and defaults; a workspace instantiates it (possibly
several times, under different local names) via WorkspaceResourceModel.
Schema
spec.properties.provider_type— must match a providerconfig.md documentspec.properties.resource_type— must match one of that provider type’sspec.resources[].namespec.properties.category/subcategory— resource classificationspec.properties.unit_cost— optional cost-tracking figure (default0.0)spec.dependencies[]— capability-based dependencies (category/subcategory/resource_type,optional) — declares what kind of resource is needed, resolved by the workspace, not a hardcoded instance referencespec.storage— optional VM-style storage config:install_path,disks[]({name, size, label, mount}),volumes[]({name, path}— must sit under one ofdisks[]’s mount points),parameters(free-form)spec.configuration— passthrough, validated against the matchingProviderConfigresource entry’s field patternsspec.default_tags/spec.custom_tags— cloud tags (both optional)spec.custom— free-form data, not consumed by any provisionerspec.lifecycle— optional IaC workflow hook phases
Example
apiVersion: strata.huybrechts.xyz/v2
kind: resource
meta:
name: storage-account
spec:
properties:
provider_type: azure
resource_type: storage_account
category: storage
configuration:
account_tier: Standard
default_tags:
environment: example
cost-center: "cc-1234"
---
apiVersion: strata.huybrechts.xyz/v2
kind: resource
meta:
name: linux-vm
spec:
properties:
provider_type: azure
resource_type: virtual_machine
category: compute
default_tags:
environment: example
cost-center: "cc-1234"
custom_tags:
owner: platform-team
Notes
A resource declares capability dependencies (e.g. “I need a
networking/virtual_network”), not a specific instance name — the workspace resolves which concrete resource satisfies it, making resources reusable across workspaces and providers.