provisioning-catalog/domains/compute-provisioning/contract.ncl

38 lines
1.5 KiB
Text
Raw Permalink Normal View History

# compute-provisioning domain contract v0.1.0
#
# Configuration context for ephemeral compute resource provisioning.
# Credentials (provider API key, SSH private key) arrive via secret-delivery.
# This domain carries only the non-secret configuration shape.
let _SizingPolicy = {
flavor | String | optional
| doc "Provider-specific machine type (e.g. 'cx41' for hcloud)",
vcpus | Number | optional,
memory_mb | Number | optional,
disk_gb | Number | optional,
} in
let _ComputeProvisioningContext = {
schema_version | String | default = "0.1.0",
workspace | String,
mode_id | String,
provider | String
| doc "Cloud provider identifier: 'hcloud', 'aws', 'local'",
region | String
| doc "Provider region or location code (e.g. 'fsn1', 'eu-central-1')",
runner_image | String | optional
| doc "Golden image name or snapshot reference for spawned VMs",
sizing | _SizingPolicy | optional,
ssh_key_name | String | optional
| doc "Name of the SSH key registered with the provider (not the key material)",
network_ids | Array String | optional
| doc "Provider network IDs to attach the spawned VM to",
labels | { _ | String } | optional
| doc "Provider-specific labels/tags applied to spawned resources",
} in
{
SizingPolicy = _SizingPolicy,
ComputeProvisioningContext = _ComputeProvisioningContext,
}