Como administrador de nuvem, você pode criar e gerenciar snapshots baseados em plug-in de discos do Google Cloud Platform (GCP) no Automation Assembler.

Se você precisar criar um backup de um disco, poderá usar o recurso Snapshot nos seus modelos de nuvem. Você pode anexar o recurso Snapshot a qualquer tipo de disco. Você também pode criar uma nova instância ou disco usando um snapshot. Após a criação do snapshot, você poderá fazer login no Google Cloud Console para ver o snapshot.

A seção a seguir contém alguns exemplos de modelos de nuvem para o uso de snapshots.

Criando um snapshot de um disco de inicialização

O modelo de nuvem a seguir mostra como você pode tirar um snapshot de um disco de inicialização anexado a uma instância. Neste exemplo, você usa um auxiliar de processamento, um auxiliar de rede, um auxiliar de imagem e um auxiliar de tipo.
formatVersion: 1
inputs: {}
resources:
  Allocations_Image_1:
    type: Allocations.Image
    properties:
      image: ubuntu
  Allocations_Network_1:
    type: Allocations.Network
    properties:
      networkType: existing
  Allocations_Compute_1:
    type: Allocations.Compute
    properties:
      accountType: gcp
  Allocations_Flavor_1:
    type: Allocations.Flavor
    properties:
      flavor: small
  mysql:
    type: Idem.GCP.COMPUTE.INSTANCE
    properties:
      name: mysql
      zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id}
      account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
      project: ${resource.Allocations_Compute_1.selectedCloudAccount.additionalProperties.gcp.project}
      network_interfaces:
        - name: nic0
          stack_type: IPV4_ONLY
          subnetwork: ${'/projects/' + resource.Allocations_Compute_1.selectedCloudAccount.additionalProperties.gcp.project + '/regions/' + resource.Allocations_Compute_1.selectedRegion.id + '/subnetworks/' + resource.Allocations_Network_1.selectedSubnet.name}
      disks:
        - device_name: ${resource.mysql-boot-disk.name}
          source: ${resource.mysql-boot-disk.resource_id}
          boot: true
        - boot: false
          device_name: ${resource.mssql-attached-disk.name}
          source: ${resource.mssql-attached-disk.resource_id}
      machine_type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_1.selectedPlacementCompute.id + '/machineTypes/' + resource.Allocations_Flavor_1.selectedInstanceTypeName}
  mssql-attached-disk:
    type: Idem.GCP.COMPUTE.DISK
    properties:
      name: attached-disk
      account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
      size_gb: 1
      project: ${resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project}
      zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.name}
      type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_1.selectedPlacementCompute.id + '/diskTypes/pd-extreme'}
  mysql-boot-disk:
    type: Idem.GCP.COMPUTE.DISK
    properties:
      name: mysql-boot-disk
      account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
      size_gb: 12
      project: ${resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project}
      zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.name}
      type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_1.selectedPlacementCompute.id + '/diskTypes/pd-balanced'}
  mysql-disk-snapshot:
    type: Idem.GCP.COMPUTE.SNAPSHOT
    dependsOn: ''
    properties:
      name: mysql-boot-disk-snapshot
      account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
      source_disk: ${resource.mysql-boot-disk.resource_id}

Você usa associações para transmitir o resource_id de mysql-boot-disk ao recurso Snapshot.

Criando uma nova instância de um snapshot

O modelo de nuvem a seguir mostra como criar uma nova instância de um snapshot. Neste exemplo, você também usa um auxiliar de processamento, auxiliar de imagem, auxiliar de rede e auxiliar de tipo.
atVersion: 1
inputs:
  disk-snapshot-Id:
    type: string
    title: Disk Snapshot Link id
resources:
  Allocations_Image_1:
    type: Allocations.Image
    properties:
      image: ubuntu
  Allocations_Network_1:
    type: Allocations.Network
    properties:
      networkType: existing
  Allocations_Compute_1:
    type: Allocations.Compute
    properties:
      accountType: gcp
  Allocations_Flavor_1:
    type: Allocations.Flavor
    properties:
      flavor: small
  mysql:
    type: Idem.GCP.COMPUTE.INSTANCE
    properties:
      name: mysql-from-snapshot
      zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id}
      account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
      project: ${resource.Allocations_Compute_1.selectedCloudAccount.additionalProperties.gcp.project}
      network_interfaces:
        - name: nic0
          stack_type: IPV4_ONLY
          subnetwork: ${'/projects/' + resource.Allocations_Compute_1.selectedCloudAccount.additionalProperties.gcp.project + '/regions/' + resource.Allocations_Compute_1.selectedRegion.id + '/subnetworks/' + resource.Allocations_Network_1.selectedSubnet.name}
      disks:
        - device_name: ${resource.restored-disk.name}
          source: ${resource.restored-disk.resource_id}
          boot: true
      machine_type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_1.selectedPlacementCompute.id + '/machineTypes/' + resource.Allocations_Flavor_1.selectedInstanceTypeName}
  restored-disk:
    type: Idem.GCP.COMPUTE.DISK
    properties:
      name: restored
      account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
      disk_name: restored-boot
      zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id}
      source_snapshot: ${input.disk-snapshot-Id}
      boot: true

Use parâmetros de entrada para permitir que os usuários insiram o snapshot-Id do snapshot que eles desejam usar para o disco de inicialização.