Skip to main content

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.

PropertyTypeDescription
apiVersionstring
kindstring
metadatamap
specVirtualMachineConfigurationDefinitionContains 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.

PropertyTypeDescription
operatingSystemstringThe operating system to be installed on the virtual machine. Determines the boot disk's source image for the 'google_compute_instance' resource.
secretslist of SecretsEntryA 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.
agentAgentConfigConfiguration for the monitoring and logging agent to be installed on the virtual machine.
volumeslist of VolumesEntryDefines volumes to be mounted into the VM. The key of this map is the absolute mount path inside the VM (e.g., /data).
startupStartupConfigConfiguration 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.

PropertyTypeDescription
scriptstring
variableslist 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.

PropertyTypeDescription
logFileslist of stringGlob pattern for log files to be collected by the OPS agent of the VirtualMachine
metricslist of MetricConfig

SecretsEntry

PropertyTypeDescription
keystring
valueVirtualMachineSecretConfig

VolumesEntry

PropertyTypeDescription
keystring
valueVirtualMachineVolumeConfig

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.

PropertyTypeDescription
namestring
typestring
fileSystemstringOnly applicable for DISK volumes. Defines the file system format. Must be compatible with the operating system.
encryptedboolOnly applicable for DISK volumes. Defines whether the disk should be encrypted or not.

VariablesEntry

PropertyTypeDescription
keystring
valueVariableConfig

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.

PropertyTypeDescription
typestringDefines 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.
targetstringIf 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.

PropertyTypeDescription
typestring
prometheusPrometheusConfig

VariableConfig

Defines a template variable for the startup script.

Resolved variables are injected into the VM's startup script execution context.

PropertyTypeDescription
defaultValuestring
requiredbool

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.

PropertyTypeDescription
schemestring
endpointstring
portint64