provisioning/schemas/infrastructure/images/contracts.ncl

47 lines
1.1 KiB
Text
Raw Normal View History

# ImageRole Contracts — type definitions for provider role images and their state.
{
ImageState = [| 'keep, 'delete_after_use, 'delete_time_lapse, 'archive |],
HardwareLimits = {
min_memory_gb | Number,
min_disk_gb | Number,
allowed_types | Array String,
network_required | Bool,
ports_required | Array Number,
ssh_required | Bool,
},
ImagePackage = {
name | String,
version | String | optional,
},
ImageRole = {
name | String,
os_base | String,
provider | String,
template_name | String,
state | ImageState,
state_config | {
freshness_days | Number,
delete_after_hours | Number | optional,
archive_path | String | optional,
},
packages | Array ImagePackage,
labels | { .. },
hardware | HardwareLimits,
},
# Written to ~/.config/provisioning/images/{provider}-{role}.ncl
ImageRoleState = {
provider | String,
role | String,
snapshot_id | String,
built_at | String | optional,
last_used | String | optional,
os_base | String,
labels | { .. },
},
}