Resources
Every piece of infrastructure in Kyku is a resource — an instance of a class extending BaseResource.
BaseResource
Section titled “BaseResource”abstract class BaseResource { abstract readonly type: ResourceType readonly id: string readonly name: string readonly provider?: string readonly tags?: Record<string, string> readonly outputs: OutputAccessor}| Property | Description |
|---|---|
id |
Logical identifier used for state tracking and dependency resolution. Auto-generated UUID if omitted. |
name |
Cloud resource name. May be prefixed automatically (see Deploy Prefix). |
type |
Discriminated union tag — 'Vpc', 'Vm', 'SecurityGroup', etc. |
provider |
Override the default provider for multi-provider configs. |
tags |
Key-value metadata mapped to provider-native labels/tags. |
outputs |
Proxy for resolved cloud outputs (IPs, ARNs, endpoints). |
Resource Type Union
Section titled “Resource Type Union”All supported resource types:
Vpc · Subnet · Vm · SecurityGroup · LoadBalancer · TargetGroup · Database · Identity · Role · SshKey · Bucket · DnsZone · DnsRecord · Secret · Certificate · KmsKey · Volume · AutoScalingGroup · Queue · Cache · KubernetesCluster · Custom · K8sNamespace · K8sConfigMap · K8sSecret · K8sPersistentVolumeClaim · K8sDeployment · K8sStatefulSet · K8sService · K8sIngress · K8sManifest · K8sHelmRelease
Config Interface Pattern
Section titled “Config Interface Pattern”Every resource has a matching Config interface:
interface VmConfig extends ResourceConfig { readonly instanceType: InstanceType readonly image: ImageType readonly network: Vpc | string readonly subnet?: Subnet | string readonly securityGroups?: (SecurityGroup | string)[] // ...}The config interface defines all user-settable properties. Provider-specific configs are never needed — use the abstract types.
Abstract Types Concept
Section titled “Abstract Types Concept”Resources are defined with abstract types instead of provider-specific values:
instanceType: 'small' // NOT 't3.small' or 'e2-small'image: 'ubuntu-22.04' // NOT 'ami-0c55b159cbfafe1f0'region: 'us-east' // NOT 'us-east-1' or 'us-central1'The provider maps these to native values during validation and creation.
Resource Lifecycle
Section titled “Resource Lifecycle”validate → plan → create / read / update / destroy- validate — Provider checks the config: does the instance type exist? Is the CIDR valid? Throws
UnsupportedFeatureErrorfor unsupported resource types. - plan — Engine diffs config against state to determine create/update/replace/destroy/no-op.
- create — Provider provisions the resource in the cloud.
- read — Provider fetches current state from the cloud (for drift detection).
- update — Provider modifies an existing resource (in-place or replace).
- destroy — Provider removes the resource from the cloud.
Resource Type Catalog
Section titled “Resource Type Catalog”See the Resources section for detailed config options per resource type.