ComputeSnapshot

Property Value
Google Cloud Service Name Compute Engine
Google Cloud Service Documentation /compute/docs/
Google Cloud REST Resource Name v1.snapshots
Google Cloud REST Resource Documentation /compute/docs/reference/rest/v1/snapshots
Config Connector Resource Short Names gcpcomputesnapshot
gcpcomputesnapshots
computesnapshot
Config Connector Service Name compute.googleapis.com
Config Connector Resource Fully Qualified Name computesnapshots.compute.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember No

Custom Resource Definition Properties

Annotations

Fields
cnrm.cloud.google.com/project-id

Spec

Schema

  description: string
  resourceID: string
  snapshotEncryptionKey:
    kmsKeyRef:
      external: string
      name: string
      namespace: string
    kmsKeyServiceAccountRef:
      external: string
      name: string
      namespace: string
    rawKey:
      value: string
      valueFrom:
        secretKeyRef:
          key: string
          name: string
    sha256: string
  sourceDiskEncryptionKey:
    kmsKeyServiceAccountRef:
      external: string
      name: string
      namespace: string
    rawKey:
      value: string
      valueFrom:
        secretKeyRef:
          key: string
          name: string
  sourceDiskRef:
    external: string
    name: string
    namespace: string
  storageLocations:
  - string
  zone: string
Fields

description

Optional

string

Immutable. An optional description of this resource.

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.

snapshotEncryptionKey

Optional

object

Immutable. The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.

snapshotEncryptionKey.kmsKeyRef

Optional

object

The encryption key that is stored in Google Cloud KMS.

snapshotEncryptionKey.kmsKeyRef.external

Optional

string

The selfLink of a KMSCryptoKey.

snapshotEncryptionKey.kmsKeyRef.name

Optional

string

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

snapshotEncryptionKey.kmsKeyRef.namespace

Optional

string

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

snapshotEncryptionKey.kmsKeyServiceAccountRef

Optional

object

The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.

snapshotEncryptionKey.kmsKeyServiceAccountRef.external

Optional

string

The email of an IAMServiceAccount.

snapshotEncryptionKey.kmsKeyServiceAccountRef.name

Optional

string

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

snapshotEncryptionKey.kmsKeyServiceAccountRef.namespace

Optional

string

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

snapshotEncryptionKey.rawKey

Optional

object

Immutable. Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.

snapshotEncryptionKey.rawKey.value

Optional

string

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

snapshotEncryptionKey.rawKey.valueFrom

Optional

object

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

snapshotEncryptionKey.rawKey.valueFrom.secretKeyRef

Optional

object

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

snapshotEncryptionKey.rawKey.valueFrom.secretKeyRef.key

Required*

string

Key that identifies the value to be extracted.

snapshotEncryptionKey.rawKey.valueFrom.secretKeyRef.name

Required*

string

Name of the Secret to extract a value from.

snapshotEncryptionKey.sha256

Optional

string

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

sourceDiskEncryptionKey

Optional

object

Immutable. The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.

sourceDiskEncryptionKey.kmsKeyServiceAccountRef

Optional

object

The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.

sourceDiskEncryptionKey.kmsKeyServiceAccountRef.external

Optional

string

The email of an IAMServiceAccount.

sourceDiskEncryptionKey.kmsKeyServiceAccountRef.name

Optional

string

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

sourceDiskEncryptionKey.kmsKeyServiceAccountRef.namespace

Optional

string

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

sourceDiskEncryptionKey.rawKey

Optional

object

Immutable. Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.

sourceDiskEncryptionKey.rawKey.value

Optional

string

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

sourceDiskEncryptionKey.rawKey.valueFrom

Optional

object

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

sourceDiskEncryptionKey.rawKey.valueFrom.secretKeyRef

Optional

object

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

sourceDiskEncryptionKey.rawKey.valueFrom.secretKeyRef.key

Required*

string

Key that identifies the value to be extracted.

sourceDiskEncryptionKey.rawKey.valueFrom.secretKeyRef.name

Required*

string

Name of the Secret to extract a value from.

sourceDiskRef

Required

object

A reference to the disk used to create this snapshot.

sourceDiskRef.external

Optional

string

The name of a ComputeDisk.

sourceDiskRef.name

Optional

string

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

sourceDiskRef.namespace

Optional

string

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

storageLocations

Optional

list (string)

Immutable. Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

storageLocations.[]

Optional

string

zone

Optional

string

Immutable. A reference to the zone where the disk is hosted.

* Field is required when parent field is specified

Status

Schema

  conditions:
  - lastTransitionTime: string
    message: string
    reason: string
    status: string
    type: string
  creationTimestamp: string
  diskSizeGb: integer
  labelFingerprint: string
  licenses:
  - string
  selfLink: string
  snapshotId: integer
  sourceDiskLink: string
  storageBytes: integer
Fields
conditions

list (object)

Conditions represents 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.

creationTimestamp

string

Creation timestamp in RFC3339 text format.

diskSizeGb

integer

Size of the snapshot, specified in GB.

labelFingerprint

string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

licenses

list (string)

A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). snapshotEncryptionKey nested object Encrypts the snapshot using a customer-supplied encryption key.

licenses.[]

string

selfLink

string

snapshotId

integer

The unique identifier for the resource.

sourceDiskLink

string

storageBytes

integer

A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.

Sample YAML(s)

Typical Use Case

  # 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: ComputeSnapshot
  metadata:
    name: computesnapshot-sample
    labels:
      label-one: "value-one"
  spec:
    description: "ComputeSnapshot Sample"
    zone: us-west1-c
    sourceDiskRef:
      name: computesnapshot-dep
    snapshotEncryptionKey:
      rawKey:
        valueFrom:
          secretKeyRef:
            name: computesnapshot-dep
            key: snapshotEncryptionKey
    sourceDiskEncryptionKey:
      rawKey:
        valueFrom:
          secretKeyRef:
            name: computesnapshot-dep
            key: sourceDiskEncryptionKey
  ---
  apiVersion: compute.cnrm.cloud.google.com/v1beta1
  kind: ComputeDisk
  metadata:
    name: computesnapshot-dep
  spec:
    location: us-west1-c
    diskEncryptionKey:
      rawKey:
        valueFrom:
          secretKeyRef:
            name: computesnapshot-dep
            key: sourceDiskEncryptionKey
  ---
  apiVersion: v1
  kind: Secret
  metadata:
    name: computesnapshot-dep
  stringData:
    snapshotEncryptionKey: a2NjIGlzIGF3ZXNvbWUgeW91IHNob3VsZCB0cnkgaXQ=
    sourceDiskEncryptionKey: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=