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 | |
| kind | string | |
| metadata | map | |
| spec | VirtualMachineConfigurationDefinition | Contains the user-defined configuration for the VM template. Encapsulates the shared configuration parameters defined in common.proto. |
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 | The operating system to be installed on the virtual machine. Determines the boot disk's source image for the 'google_compute_instance' resource. |
| secrets | list of SecretsEntry | A map of secrets to be made available to the virtual machine. The key is the name of the 'Secret' manifest, and the value defines how it should be exposed (e.g., as a file or environment variable). The platform fetches the specified secrets from Google Secret Manager and uses the startup script to inject them into the VM's environment or file system. |
| agent | AgentConfig | Configuration for the monitoring and logging agent to be installed on the virtual machine. |
| volumes | list of VolumesEntry | Defines volumes to be mounted into the VM. The key of this map is the absolute mount path inside the VM (e.g., /data). |
| startup | StartupConfig | Configuration for the virtual machine's startup process. |
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 | |
| variables | list of VariablesEntry |
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 | Glob pattern for log files to be collected by the OPS agent of the VirtualMachine |
| metrics | list of MetricConfig |
SecretsEntry
| Property | Type | Description |
|---|---|---|
| key | string | |
| value | VirtualMachineSecretConfig |
VolumesEntry
| Property | Type | Description |
|---|---|---|
| key | string | |
| value | VirtualMachineVolumeConfig |
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 | |
| type | string | |
| fileSystem | string | Only applicable for DISK volumes. Defines the file system format. Must be compatible with the operating system. |
| encrypted | bool | Only applicable for DISK volumes. Defines whether the disk should be encrypted or not. |
VariablesEntry
| Property | Type | Description |
|---|---|---|
| key | string | |
| value | VariableConfig |
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 | Defines how the secret should be exposed to the virtual machine. Can be 'ENV_VAR' to set it as an environment variable or 'FILE' to write it to a file. |
| target | string | If type is 'FILE', this is the absolute path where the secret file will be created. If type is 'ENV_VAR', this is the name of the environment variable. |
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 | |
| prometheus | 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 | |
| required | bool |
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 | |
| endpoint | string | |
| port | int64 |