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
snapshotEncryptionKey:
  rawKey:
    value: string
    valueFrom:
      secretKeyRef:
        key: string
        name: string
  sha256: string
sourceDiskEncryptionKey:
  rawKey:
    value: string
    valueFrom:
      secretKeyRef:
        key: string
        name: string
sourceDiskRef:
  external: string
  name: string
  namespace: string
zone: string
Fields

description

Optional

string

An optional description of this resource.

snapshotEncryptionKey

Optional

object

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

snapshotEncryptionKey.rawKey

Required*

object

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

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

sourceDiskEncryptionKey.rawKey

Optional

object

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/

zone

Optional

string

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.[]

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)

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=