Virtual Machine Configuration
VirtualMachineConfiguration
Defines a reusable configuration template for virtual machine instances.
Encapsulates standardized operating system selections, base bootstrapping scripts, and baseline observability configurations (e.g., logging and metric agents). Serves as an archetypal foundation referenced by individual virtual machine deployments to ensure fleet-wide consistency and compliance.
| Property | Type | Description |
|---|---|---|
| apiVersion | string | API schema version. Pins the manifest to a specific schema contract for backward-compatibility. Must be the constant lowops.manifests.v1. |
| kind | string | Resource kind discriminator. Identifies this document as a VirtualMachineConfiguration so the engine routes it to the correct defaulter, validator, computer, and executor. Must be the constant VirtualMachineConfiguration. |
| metadata | map | Classification labels and graph linkage. Free-form key/value pairs used to classify the manifest. Certain reserved keys (e.g. name, organization) are read by the engine to resolve this manifest's identity and let VirtualMachine manifests reference it in the dependency graph. |
| spec | VirtualMachineConfigurationDefinition | Reusable VM template definition. The operating system, base startup script, and observability agent settings shared by every VirtualMachine that references this configuration by name. See VirtualMachineConfigurationDefinition. |
VirtualMachineConfigurationDefinition
Defines the core configuration for a virtual machine blueprint.
Acts as a templatable base for VirtualMachine manifests, establishing OS images, agent specs, and baseline secrets for google_compute_instance creation.
| Property | Type | Description |
|---|---|---|
| operatingSystem | string | Operating system. The OS installed on the VM, which selects the boot disk's source image for the google_compute_instance. One of the supported Debian, Ubuntu, or Windows Server values. |
| secrets | list of SecretsEntry | Secrets available to the VM. A map from Secret manifest name to how it is exposed on the VM. The platform fetches each payload from Secret Manager and uses the startup script to inject it as a file or environment variable. See VirtualMachineSecretConfig. |
| agent | AgentConfig | Ops Agent configuration. The monitoring and logging agent configuration installed on the VM, controlling which logs and metrics are exported. See AgentConfig. |
| volumes | list of VolumesEntry | Volume definitions. A map from in-VM absolute mount path (e.g. /data) to the volume mounted there. See VirtualMachineVolumeConfig. |
| startup | StartupConfig | Startup configuration. The VM's startup script and its template variables, rendered into the instance metadata. See StartupConfig. |
VolumesEntry
| Property | Type | Description |
|---|---|---|
| key | string | |
| value | VirtualMachineVolumeConfig |
AgentConfig
Configuration for the Ops Agent deployed on the VM.
Drives the installation and configuration of the Google Cloud Ops Agent on the instance, dictating which logs and metrics are exported to Cloud Monitoring.
| Property | Type | Description |
|---|---|---|
| logFiles | list of string | Log file glob patterns. Glob patterns identifying the log files the Ops Agent tails and ships to Cloud Logging from the VM. Applied to the agent's LogFiles configuration. |
| metrics | list of MetricConfig | Custom metric receivers. A list of custom metric collectors added to the Ops Agent configuration on the VM. See MetricConfig. |
StartupConfig
Configuration for VM startup scripting.
Populates the metadata.startup-script field of the google_compute_instance, executing specified logic and injecting templated variables on boot.
| Property | Type | Description |
|---|---|---|
| script | string | Startup script template. The script body written to the instance's metadata.startup-script. Templated variables from variables are substituted before execution on boot. |
| variables | list of VariablesEntry | Script template variables. A map from variable name to its definition (default value and whether it is required), substituted into the startup script's execution context. See VariableConfig. |
SecretsEntry
| Property | Type | Description |
|---|---|---|
| key | string | |
| value | VirtualMachineSecretConfig |
VirtualMachineSecretConfig
Configures how secrets are provisioned directly to a Virtual Machine.
Intercepts Google Secret Manager payloads and drives startup scripts to write them out as files or variables prior to VM application startup.
| Property | Type | Description |
|---|---|---|
| type | string | Exposure mechanism. How the secret is delivered to the VM: ENV_VAR sets it as an environment variable, or FILE writes it to a file via the startup script. |
| target | string | Destination for the secret. The target location: when type is FILE, the absolute path of the file to create; when type is ENV_VAR, the name of the environment variable to set. Consumed by the VM computer to populate the startup configuration. |
VariablesEntry
| Property | Type | Description |
|---|---|---|
| key | string | |
| value | VariableConfig |
VirtualMachineVolumeConfig
Defines a storage volume to be attached to a virtual machine.
Translates into google_compute_disk or bucket mount instructions, attaching physical or logical storage media to the google_compute_instance.
| Property | Type | Description |
|---|---|---|
| name | string | Volume name. A logical name for the volume, referenced by VirtualMachine volume mounts and carried into the computed bucket/disk configuration. |
| type | string | Volume kind. The backing storage type: BUCKET (Cloud Storage FUSE mount), DISK (a persistent google_compute_disk), or SECRET (a Secret Manager payload). |
| fileSystem | string | Disk filesystem format. Only applicable to DISK volumes. The filesystem the disk is formatted with; must be compatible with the VM operating system. Lower-cased and carried into the computed disk configuration. |
| encrypted | bool | Disk encryption. Only applicable to DISK volumes. When true, the provisioned disk is encrypted. Carried into the computed disk configuration. |
MetricConfig
Configures custom metric collection for the Ops Agent.
Adds custom receivers to the Ops Agent configuration file running within the virtual machine.
| Property | Type | Description |
|---|---|---|
| type | string | Receiver type. The kind of metric receiver to add to the Ops Agent. Currently only prometheus is supported. |
| prometheus | PrometheusConfig | Prometheus receiver settings. The Prometheus scrape configuration used when type is prometheus. See PrometheusConfig. |
VariableConfig
Defines a template variable for the startup script.
Resolved variables are injected into the VM's startup script execution context.
| Property | Type | Description |
|---|---|---|
| defaultValue | string | Default value. The value substituted for the variable when no explicit value is provided by the VM manifest. |
| required | bool | Whether the variable is mandatory. When true, the VM computer errors if the variable is left unset, enforcing that a value is supplied before the startup script is rendered. |
PrometheusConfig
Configures a Prometheus receiver for the Ops Agent.
Instructs the Ops Agent to scrape Prometheus metrics from the specified endpoint and port on the VM localhost loopback.
| Property | Type | Description |
|---|---|---|
| scheme | string | Scrape scheme. The URL scheme the Ops Agent uses to scrape metrics: http or https. |
| endpoint | string | Scrape endpoint. The metrics path/endpoint scraped on the VM's localhost loopback (e.g. /metrics). |
| port | int64 | Scrape port. The localhost port the Ops Agent scrapes for Prometheus metrics. |