ComputeInstance


Property Value
Google Cloud Service Name Compute Engine
Google Cloud Service Documentation /compute/docs/
Google Cloud REST Resource Name v1.instances
Google Cloud REST Resource Documentation /compute/docs/reference/rest/v1/instances
Config Connector Resource Short Names gcpcomputeinstance
gcpcomputeinstances
computeinstance
Config Connector Service Name compute.googleapis.com
Config Connector Resource Fully Qualified Name computeinstances.compute.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember Yes
Supports IAM Conditions Yes
Supports IAM Audit Configs No
IAM External Reference Format

projects/{{project}}/zones/{{zone}}/instances/{{name}}

Config Connector Default Average Reconcile Interval In Seconds 600

Custom Resource Definition Properties

Annotations

Fields
cnrm.cloud.google.com/allow-stopping-for-update
cnrm.cloud.google.com/project-id
cnrm.cloud.google.com/state-into-spec

Spec

Schema

advancedMachineFeatures:
  enableNestedVirtualization: boolean
  threadsPerCore: integer
  visibleCoreCount: integer
attachedDisk:
- deviceName: string
  diskEncryptionKeyRaw:
    value: string
    valueFrom:
      secretKeyRef:
        key: string
        name: string
  diskEncryptionKeySha256: string
  kmsKeyRef:
    external: string
    name: string
    namespace: string
  mode: string
  sourceDiskRef:
    external: string
    name: string
    namespace: string
bootDisk:
  autoDelete: boolean
  deviceName: string
  diskEncryptionKeyRaw:
    value: string
    valueFrom:
      secretKeyRef:
        key: string
        name: string
  diskEncryptionKeySha256: string
  initializeParams:
    labels: {}
    resourceManagerTags: {}
    size: integer
    sourceImageRef:
      external: string
      name: string
      namespace: string
    type: string
  kmsKeyRef:
    external: string
    name: string
    namespace: string
  mode: string
  sourceDiskRef:
    external: string
    name: string
    namespace: string
canIpForward: boolean
confidentialInstanceConfig:
  enableConfidentialCompute: boolean
deletionProtection: boolean
description: string
desiredStatus: string
enableDisplay: boolean
guestAccelerator:
- count: integer
  type: string
hostname: string
instanceTemplateRef:
  external: string
  name: string
  namespace: string
machineType: string
metadata:
- key: string
  value: string
metadataStartupScript: string
minCpuPlatform: string
networkInterface:
- accessConfig:
  - natIpRef:
      external: string
      name: string
      namespace: string
    networkTier: string
    publicPtrDomainName: string
  aliasIpRange:
  - ipCidrRange: string
    subnetworkRangeName: string
  internalIpv6PrefixLength: integer
  ipv6AccessConfig:
  - externalIpv6: string
    externalIpv6PrefixLength: string
    name: string
    networkTier: string
    publicPtrDomainName: string
  ipv6AccessType: string
  ipv6Address: string
  name: string
  networkIp: string
  networkIpRef:
    external: string
    kind: string
    name: string
    namespace: string
  networkRef:
    external: string
    name: string
    namespace: string
  nicType: string
  queueCount: integer
  stackType: string
  subnetworkProject: string
  subnetworkRef:
    external: string
    name: string
    namespace: string
networkPerformanceConfig:
  totalEgressBandwidthTier: string
params:
  resourceManagerTags: {}
reservationAffinity:
  specificReservation:
    key: string
    values:
    - string
  type: string
resourceID: string
resourcePolicies:
- external: string
  name: string
  namespace: string
scheduling:
  automaticRestart: boolean
  instanceTerminationAction: string
  localSsdRecoveryTimeout:
    nanos: integer
    seconds: integer
  maintenanceInterval: string
  maxRunDuration:
    nanos: integer
    seconds: integer
  minNodeCpus: integer
  nodeAffinities:
  - value: {}
  onHostMaintenance: string
  preemptible: boolean
  provisioningModel: string
scratchDisk:
- interface: string
  size: integer
serviceAccount:
  scopes:
  - string
  serviceAccountRef:
    external: string
    name: string
    namespace: string
shieldedInstanceConfig:
  enableIntegrityMonitoring: boolean
  enableSecureBoot: boolean
  enableVtpm: boolean
tags:
- string
zone: string
Fields

advancedMachineFeatures

Optional

object

Controls for advanced machine-related behavior features.

advancedMachineFeatures.enableNestedVirtualization

Optional

boolean

Whether to enable nested virtualization or not.

advancedMachineFeatures.threadsPerCore

Optional

integer

The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.

advancedMachineFeatures.visibleCoreCount

Optional

integer

The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance\'s nominal CPU count and the underlying platform\'s SMT width.

attachedDisk

Optional

list (object)

List of disks attached to the instance.

attachedDisk[]

Optional

object

attachedDisk[].deviceName

Optional

string

Name with which the attached disk is accessible under /dev/disk/by-id/.

attachedDisk[].diskEncryptionKeyRaw

Optional

object

A 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to encrypt this disk. Only one of kms_key_self_link and disk_encryption_key_raw may be set.

attachedDisk[].diskEncryptionKeyRaw.value

Optional

string

Value of the field. Cannot be used if 'valueFrom' is specified.

attachedDisk[].diskEncryptionKeyRaw.valueFrom

Optional

object

Source for the field's value. Cannot be used if 'value' is specified.

attachedDisk[].diskEncryptionKeyRaw.valueFrom.secretKeyRef

Optional

object

Reference to a value with the given key in the given Secret in the resource's namespace.

attachedDisk[].diskEncryptionKeyRaw.valueFrom.secretKeyRef.key

Required*

string

Key that identifies the value to be extracted.

attachedDisk[].diskEncryptionKeyRaw.valueFrom.secretKeyRef.name

Required*

string

Name of the Secret to extract a value from.

attachedDisk[].diskEncryptionKeySha256

Optional

string

The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

attachedDisk[].kmsKeyRef

Optional

object

attachedDisk[].kmsKeyRef.external

Optional

string

Allowed value: The `selfLink` field of a `KMSCryptoKey` resource.

attachedDisk[].kmsKeyRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

attachedDisk[].kmsKeyRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

attachedDisk[].mode

Optional

string

Read/write mode for the disk. One of "READ_ONLY" or "READ_WRITE".

attachedDisk[].sourceDiskRef

Required*

object

attachedDisk[].sourceDiskRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeDisk` resource.

attachedDisk[].sourceDiskRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

attachedDisk[].sourceDiskRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

bootDisk

Optional

object

Immutable. The boot disk for the instance.

bootDisk.autoDelete

Optional

boolean

Immutable. Whether the disk will be auto-deleted when the instance is deleted.

bootDisk.deviceName

Optional

string

Immutable. Name with which attached disk will be accessible under /dev/disk/by-id/.

bootDisk.diskEncryptionKeyRaw

Optional

object

Immutable. A 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to encrypt this disk. Only one of kms_key_self_link and disk_encryption_key_raw may be set.

bootDisk.diskEncryptionKeyRaw.value

Optional

string

Value of the field. Cannot be used if 'valueFrom' is specified.

bootDisk.diskEncryptionKeyRaw.valueFrom

Optional

object

Source for the field's value. Cannot be used if 'value' is specified.

bootDisk.diskEncryptionKeyRaw.valueFrom.secretKeyRef

Optional

object

Reference to a value with the given key in the given Secret in the resource's namespace.

bootDisk.diskEncryptionKeyRaw.valueFrom.secretKeyRef.key

Required*

string

Key that identifies the value to be extracted.

bootDisk.diskEncryptionKeyRaw.valueFrom.secretKeyRef.name

Required*

string

Name of the Secret to extract a value from.

bootDisk.diskEncryptionKeySha256

Optional

string

The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

bootDisk.initializeParams

Optional

object

Immutable. Parameters with which a disk was created alongside the instance.

bootDisk.initializeParams.labels

Optional

object

Immutable. A set of key/value label pairs assigned to the disk.

bootDisk.initializeParams.resourceManagerTags

Optional

object

Immutable. A map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

bootDisk.initializeParams.size

Optional

integer

Immutable. The size of the image in gigabytes.

bootDisk.initializeParams.sourceImageRef

Optional

object

Immutable. The image from which to initialize this disk.

bootDisk.initializeParams.sourceImageRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeImage` resource.

bootDisk.initializeParams.sourceImageRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

bootDisk.initializeParams.sourceImageRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

bootDisk.initializeParams.type

Optional

string

Immutable. The Google Compute Engine disk type. Such as pd-standard, pd-ssd or pd-balanced.

bootDisk.kmsKeyRef

Optional

object

bootDisk.kmsKeyRef.external

Optional

string

Allowed value: The `selfLink` field of a `KMSCryptoKey` resource.

bootDisk.kmsKeyRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

bootDisk.kmsKeyRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

bootDisk.mode

Optional

string

Immutable. Read/write mode for the disk. One of "READ_ONLY" or "READ_WRITE".

bootDisk.sourceDiskRef

Optional

object

Immutable. The source disk used to create this disk.

bootDisk.sourceDiskRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeDisk` resource.

bootDisk.sourceDiskRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

bootDisk.sourceDiskRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

canIpForward

Optional

boolean

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

confidentialInstanceConfig

Optional

object

Immutable. The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail to create.

confidentialInstanceConfig.enableConfidentialCompute

Required*

boolean

Defines whether the instance should have confidential compute enabled.

deletionProtection

Optional

boolean

Whether deletion protection is enabled on this instance.

description

Optional

string

Immutable. A brief description of the resource.

desiredStatus

Optional

string

Desired status of the instance. Either "RUNNING" or "TERMINATED".

enableDisplay

Optional

boolean

Whether the instance has virtual displays enabled.

guestAccelerator

Optional

list (object)

Immutable. List of the type and count of accelerator cards attached to the instance.

guestAccelerator[]

Optional

object

guestAccelerator[].count

Required*

integer

Immutable. The number of the guest accelerator cards exposed to this instance.

guestAccelerator[].type

Required*

string

Immutable. The accelerator type resource exposed to this instance. E.g. nvidia-tesla-k80.

hostname

Optional

string

Immutable. A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression [a-z]([-a-z0-9]*[a-z0-9]), concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

instanceTemplateRef

Optional

object

instanceTemplateRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeInstanceTemplate` resource.

instanceTemplateRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

instanceTemplateRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

machineType

Optional

string

The machine type to create.

metadata

Optional

list (object)

metadata[]

Optional

object

metadata[].key

Required*

string

metadata[].value

Required*

string

metadataStartupScript

Optional

string

Immutable. Metadata startup scripts made available within the instance.

minCpuPlatform

Optional

string

The minimum CPU platform specified for the VM instance.

networkInterface

Optional

list (object)

Immutable. The networks attached to the instance.

networkInterface[]

Optional

object

networkInterface[].accessConfig

Optional

list (object)

Access configurations, i.e. IPs via which this instance can be accessed via the Internet.

networkInterface[].accessConfig[]

Optional

object

networkInterface[].accessConfig[].natIpRef

Optional

object

networkInterface[].accessConfig[].natIpRef.external

Optional

string

Allowed value: The `address` field of a `ComputeAddress` resource.

networkInterface[].accessConfig[].natIpRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

networkInterface[].accessConfig[].natIpRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

networkInterface[].accessConfig[].networkTier

Optional

string

The networking tier used for configuring this instance. One of PREMIUM or STANDARD.

networkInterface[].accessConfig[].publicPtrDomainName

Optional

string

The DNS domain name for the public PTR record.

networkInterface[].aliasIpRange

Optional

list (object)

An array of alias IP ranges for this network interface.

networkInterface[].aliasIpRange[]

Optional

object

networkInterface[].aliasIpRange[].ipCidrRange

Required*

string

The IP CIDR range represented by this alias IP range.

networkInterface[].aliasIpRange[].subnetworkRangeName

Optional

string

The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range.

networkInterface[].internalIpv6PrefixLength

Optional

integer

The prefix length of the primary internal IPv6 range.

networkInterface[].ipv6AccessConfig

Optional

list (object)

An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access.

networkInterface[].ipv6AccessConfig[]

Optional

object

networkInterface[].ipv6AccessConfig[].externalIpv6

Optional

string

Immutable. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork.

networkInterface[].ipv6AccessConfig[].externalIpv6PrefixLength

Optional

string

Immutable. The prefix length of the external IPv6 range.

networkInterface[].ipv6AccessConfig[].name

Optional

string

Immutable. The name of this access configuration. In ipv6AccessConfigs, the recommended name is External IPv6.

networkInterface[].ipv6AccessConfig[].networkTier

Required*

string

The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM tier is valid for IPv6.

networkInterface[].ipv6AccessConfig[].publicPtrDomainName

Optional

string

The domain name to be used when creating DNSv6 records for the external IPv6 ranges.

networkInterface[].ipv6AccessType

Optional

string

One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork.

networkInterface[].ipv6Address

Optional

string

An IPv6 internal network address for this network interface. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork.

networkInterface[].name

Optional

string

The name of the interface.

networkInterface[].networkIp

Optional

string

DEPRECATED. Although this field is still available, there is limited support. We recommend that you use `spec.networkInterface.networkIpRef` instead.

networkInterface[].networkIpRef

Optional

object

networkInterface[].networkIpRef.external

Optional

string

Allowed value: The `address` field of a `ComputeAddress` resource.

networkInterface[].networkIpRef.kind

Optional

string

Kind of the referent. Allowed values: ComputeAddress

networkInterface[].networkIpRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

networkInterface[].networkIpRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

networkInterface[].networkRef

Optional

object

networkInterface[].networkRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeNetwork` resource.

networkInterface[].networkRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

networkInterface[].networkRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

networkInterface[].nicType

Optional

string

Immutable. The type of vNIC to be used on this interface. Possible values:GVNIC, VIRTIO_NET.

networkInterface[].queueCount

Optional

integer

Immutable. The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.

networkInterface[].stackType

Optional

string

The stack type for this network interface to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used.

networkInterface[].subnetworkProject

Optional

string

The project in which the subnetwork belongs.

networkInterface[].subnetworkRef

Optional

object

networkInterface[].subnetworkRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeSubnetwork` resource.

networkInterface[].subnetworkRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

networkInterface[].subnetworkRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

networkPerformanceConfig

Optional

object

Immutable. Configures network performance settings for the instance. If not specified, the instance will be created with its default network performance configuration.

networkPerformanceConfig.totalEgressBandwidthTier

Required*

string

Immutable. The egress bandwidth tier to enable. Possible values:TIER_1, DEFAULT.

params

Optional

object

Immutable. Stores additional params passed with the request, but not persisted as part of resource payload.

params.resourceManagerTags

Optional

object

Immutable. A map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

reservationAffinity

Optional

object

Immutable. Specifies the reservations that this instance can consume from.

reservationAffinity.specificReservation

Optional

object

Immutable. Specifies the label selector for the reservation to use.

reservationAffinity.specificReservation.key

Required*

string

Immutable. Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify compute.googleapis.com/reservation-name as the key and specify the name of your reservation as the only value.

reservationAffinity.specificReservation.values

Required*

list (string)

Immutable. Corresponds to the label values of a reservation resource.

reservationAffinity.specificReservation.values[]

Required*

string

reservationAffinity.type

Required*

string

Immutable. The type of reservation from which this instance can consume resources.

resourceID

Optional

string

Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.

resourcePolicies

Optional

list (object)

resourcePolicies[]

Optional

object

resourcePolicies[].external

Optional

string

Allowed value: The `selfLink` field of a `ComputeResourcePolicy` resource.

resourcePolicies[].name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

resourcePolicies[].namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

scheduling

Optional

object

The scheduling strategy being used by the instance.

scheduling.automaticRestart

Optional

boolean

Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user).

scheduling.instanceTerminationAction

Optional

string

Specifies the action GCE should take when SPOT VM is preempted.

scheduling.localSsdRecoveryTimeout

Optional

object

Immutable. Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

scheduling.localSsdRecoveryTimeout.nanos

Optional

integer

Immutable. Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

scheduling.localSsdRecoveryTimeout.seconds

Required*

integer

Immutable. Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.

scheduling.maintenanceInterval

Optional

string

Specifies the frequency of planned maintenance events. The accepted values are: PERIODIC.

scheduling.maxRunDuration

Optional

object

Immutable. The timeout for new network connections to hosts.

scheduling.maxRunDuration.nanos

Optional

integer

Immutable. Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

scheduling.maxRunDuration.seconds

Required*

integer

Immutable. Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.

scheduling.minNodeCpus

Optional

integer

scheduling.nodeAffinities

Optional

list (object)

scheduling.nodeAffinities[]

Optional

object

scheduling.nodeAffinities[].value

Optional

object

scheduling.onHostMaintenance

Optional

string

Describes maintenance behavior for the instance. One of MIGRATE or TERMINATE,.

scheduling.preemptible

Optional

boolean

Immutable. Whether the instance is preemptible.

scheduling.provisioningModel

Optional

string

Immutable. Whether the instance is spot. If this is set as SPOT.

scratchDisk

Optional

list (object)

Immutable. The scratch disks attached to the instance.

scratchDisk[]

Optional

object

scratchDisk[].interface

Required*

string

The disk interface used for attaching this disk. One of SCSI or NVME.

scratchDisk[].size

Optional

integer

Immutable. The size of the disk in gigabytes. One of 375 or 3000.

serviceAccount

Optional

object

The service account to attach to the instance.

serviceAccount.scopes

Required*

list (string)

A list of service scopes.

serviceAccount.scopes[]

Required*

string

serviceAccount.serviceAccountRef

Optional

object

serviceAccount.serviceAccountRef.external

Optional

string

Allowed value: The `email` field of an `IAMServiceAccount` resource.

serviceAccount.serviceAccountRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

serviceAccount.serviceAccountRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

shieldedInstanceConfig

Optional

object

The shielded vm config being used by the instance.

shieldedInstanceConfig.enableIntegrityMonitoring

Optional

boolean

Whether integrity monitoring is enabled for the instance.

shieldedInstanceConfig.enableSecureBoot

Optional

boolean

Whether secure boot is enabled for the instance.

shieldedInstanceConfig.enableVtpm

Optional

boolean

Whether the instance uses vTPM.

tags

Optional

list (string)

The list of tags attached to the instance.

tags[]

Optional

string

zone

Optional

string

Immutable. The zone of the instance. If self_link is provided, this value is ignored. If neither self_link nor zone are provided, the provider zone is used.

* Field is required when parent field is specified

Status

Schema

conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
cpuPlatform: string
currentStatus: string
instanceId: string
labelFingerprint: string
metadataFingerprint: string
observedGeneration: integer
selfLink: string
tagsFingerprint: string
Fields
conditions

list (object)

Conditions represent the latest available observation of the resource's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

cpuPlatform

string

The CPU platform used by this instance.

currentStatus

string

Current status of the instance. This could be one of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see [Instance life cycle](https://cloud.google.com/compute/docs/instances/instance-life-cycle).

instanceId

string

The server-assigned unique identifier of this instance.

labelFingerprint

string

The unique fingerprint of the labels.

metadataFingerprint

string

The unique fingerprint of the metadata.

observedGeneration

integer

ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.

selfLink

string

The URI of the created resource.

tagsFingerprint

string

The unique fingerprint of the tags.

Sample YAML(s)

Cloud Machine Instance

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstance
metadata:
  annotations:
    cnrm.cloud.google.com/allow-stopping-for-update: "true"
  name: computeinstance-sample-cloudmachine
  labels:
    created-from: "image"
    network-type: "subnetwork"
spec:
  machineType: n1-standard-1
  zone: us-west1-a
  bootDisk:
    initializeParams:
      size: 24
      type: pd-ssd
      sourceImageRef:
        external: debian-cloud/debian-11
  networkInterface:
    - subnetworkRef:
        name: computeinstance-dep-cloudmachine
      aliasIpRange:
        - ipCidrRange: /24
          subnetworkRangeName: cloudrange
  attachedDisk:
    - sourceDiskRef:
        name: computeinstance-dep1-cloudmachine
      mode: READ_ONLY
      deviceName: proxycontroldisk
      diskEncryptionKeyRaw:
        valueFrom:
          secretKeyRef:
            name: computeinstance-dep-cloudmachine
            key: diskEncryptionKey
    - sourceDiskRef:
        name: computeinstance-dep2-cloudmachine
      mode: READ_WRITE
      deviceName: persistentdisk
  minCpuPlatform: "Intel Skylake"
  serviceAccount:
    serviceAccountRef:
      name: inst-dep-cloudmachine
    scopes:
    - compute-rw
    - logging-write
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
metadata:
  name: computeinstance-dep1-cloudmachine
spec:
  description: a sample encrypted, blank disk
  physicalBlockSizeBytes: 4096
  size: 1
  type: pd-ssd
  location: us-west1-a
  diskEncryptionKey:
    rawKey:
      valueFrom:
        secretKeyRef:
          name: computeinstance-dep-cloudmachine
          key: diskEncryptionKey
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
metadata:
  name: computeinstance-dep2-cloudmachine
spec:
  size: 1
  type: pd-ssd
  location: us-west1-a
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
  name: computeinstance-dep-cloudmachine
spec:
  routingMode: REGIONAL
  autoCreateSubnetworks: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSubnetwork
metadata:
  name: computeinstance-dep-cloudmachine
spec:
  networkRef:
    name: computeinstance-dep-cloudmachine
  ipCidrRange: 10.2.0.0/16
  region: us-west1
  secondaryIpRange:
    - rangeName: cloudrange
      ipCidrRange: 10.3.16.0/20
---
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
metadata:
  name: inst-dep-cloudmachine
---
apiVersion: v1
kind: Secret
metadata:
  name: computeinstance-dep-cloudmachine
stringData:
  diskEncryptionKey: "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="

Instance From Template

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstance
metadata:
  annotations:
    cnrm.cloud.google.com/allow-stopping-for-update: "false"
  name: computeinstance-sample-fromtemplate
  labels:
    created-from: "template"
    override-type: "largermachine"
spec:
  machineType: n1-standard-2
  instanceTemplateRef:
    name: computeinstance-dep-fromtemplate
  zone: us-west1-c
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
metadata:
  name: computeinstance-dep-fromtemplate
spec:
  physicalBlockSizeBytes: 4096
  size: 1
  type: pd-ssd
  location: us-west1-c
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstanceTemplate
metadata:
  name: computeinstance-dep-fromtemplate
spec:
  machineType: n1-standard-1
  region: us-west1
  disk:
    - sourceDiskRef:
        name: computeinstance-dep-fromtemplate
      boot: true
  networkInterface:
    - networkRef:
        name: computeinstance-dep-fromtemplate
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
  name: computeinstance-dep-fromtemplate
spec:
  routingMode: REGIONAL
  autoCreateSubnetworks: true

Instance With Networkipref

# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstance
metadata:
  annotations:
    cnrm.cloud.google.com/allow-stopping-for-update: "true"
  name: computeinstance-sample-networkipref
  labels:
    label-one: "value-one"
spec:
  description: an basic instance example
  machineType: n1-standard-1
  zone: us-west1-a
  bootDisk:
    sourceDiskRef:
      name: computeinstance-dep1-networkipref
    autoDelete: false
  attachedDisk:
  - sourceDiskRef:
      name: computeinstance-dep2-networkipref
  serviceAccount:
    serviceAccountRef:
      name: inst-dep-networkipref
    scopes:
    - cloud-platform
  networkInterface:
  - networkRef:
      name: computeinstance-dep-networkipref
    networkIpRef:
      kind: ComputeAddress
      name: computeinstance-dep-networkipref
  metadataStartupScript: "echo hi > /test.txt"
  metadata:
  - key: foo
    value: bar
  - key: bar
    value: baz
  scheduling:
    preemptible: true
    automaticRestart: false
    onHostMaintenance: TERMINATE
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
  name: computeinstance-dep-networkipref
spec:
  description: a external address for the test compute instance
  location: us-west1
  addressType: INTERNAL
  purpose: GCE_ENDPOINT
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
metadata:
  name: computeinstance-dep1-networkipref
spec:
  location: us-west1-a
  imageRef:
    external: debian-cloud/debian-11
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
metadata:
  name: computeinstance-dep2-networkipref
spec:
  description: "an attached disk for Compute Instance"
  location: us-west1-a
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
  name: computeinstance-dep-networkipref
spec:
  routingMode: REGIONAL
  autoCreateSubnetworks: true
---
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
metadata:
  name: inst-dep-networkipref

Network Worker Instance

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstance
metadata:
  annotations:
    cnrm.cloud.google.com/allow-stopping-for-update: "false"
  name: computeinstance-sample-networkworker
  labels:
    created-from: "disk"
    network-type: "global"
spec:
  machineType: n1-standard-1
  zone: us-west2-a
  bootDisk:
    sourceDiskRef:
      name: computeinstance-dep-networkworker
    autoDelete: false
    deviceName: proxycontroldisk
    mode: READ_ONLY
    diskEncryptionKeyRaw:
      valueFrom:
        secretKeyRef:
          name: computeinstance-dep-networkworker
          key: diskEncryptionKey
  networkInterface:
    - networkRef:
        name: computeinstance-dep-networkworker
      subnetworkRef:
        name: computeinstance-dep-networkworker
      networkIp: "10.2.0.4"
      accessConfig:
        - natIpRef:
            name: computeinstance-dep-networkworker
  scratchDisk:
    - interface: SCSI
    - interface: NVME
  scheduling:
    preemptible: true
    automaticRestart: false
    onHostMaintenance: TERMINATE
  canIpForward: true
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
  name: computeinstance-dep-networkworker
spec:
  description: a sample external address
  location: us-west2
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
metadata:
  name: computeinstance-dep-networkworker
spec:
  description: a sample encrypted, blank disk
  physicalBlockSizeBytes: 4096
  size: 1
  type: pd-ssd
  location: us-west2-a
  diskEncryptionKey:
    rawKey:
      valueFrom:
        secretKeyRef:
          name: computeinstance-dep-networkworker
          key: diskEncryptionKey
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
  name: computeinstance-dep-networkworker
spec:
  routingMode: REGIONAL
  autoCreateSubnetworks: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSubnetwork
metadata:
  name: computeinstance-dep-networkworker
spec:
  ipCidrRange: 10.2.0.0/16
  region: us-west2
  description: a sample subnetwork
  privateIpGoogleAccess: false
  networkRef:
    name: computeinstance-dep-networkworker
  logConfig:
    aggregationInterval: INTERVAL_10_MIN
    flowSampling: 0.5
    metadata: INCLUDE_ALL_METADATA
---
apiVersion: v1
kind: Secret
metadata:
  name: computeinstance-dep-networkworker
stringData:
  diskEncryptionKey: "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="