pulumi_wasm_providers_gcp_mini::compute

Module region_per_instance_config

source
Expand description

A config defined for a single managed instance that belongs to an instance group manager. It preserves the instance name across instance group manager operations and can define stateful disks or metadata that are unique to the instance. This resource works with regional instance group managers.

To get more information about RegionPerInstanceConfig, see:

§Example Usage

§Stateful Rigm

resources:
  igm-basic:
    type: gcp:compute:InstanceTemplate
    properties:
      name: my-template
      machineType: e2-medium
      canIpForward: false
      tags:
        - foo
        - bar
      disks:
        - sourceImage: ${myImage.selfLink}
          autoDelete: true
          boot: true
      networkInterfaces:
        - network: default
      serviceAccount:
        scopes:
          - userinfo-email
          - compute-ro
          - storage-ro
  rigm:
    type: gcp:compute:RegionInstanceGroupManager
    properties:
      description: Demo test instance group manager
      name: my-rigm
      versions:
        - name: prod
          instanceTemplate: ${["igm-basic"].selfLink}
      updatePolicy:
        type: OPPORTUNISTIC
        instanceRedistributionType: NONE
        minimalAction: RESTART
      baseInstanceName: rigm
      region: us-central1
      targetSize: 2
  default:
    type: gcp:compute:Disk
    properties:
      name: my-disk-name
      type: pd-ssd
      zone: us-central1-a
      image: debian-11-bullseye-v20220719
      physicalBlockSizeBytes: 4096
  withDisk:
    type: gcp:compute:RegionPerInstanceConfig
    name: with_disk
    properties:
      region: ${igm.region}
      regionInstanceGroupManager: ${rigm.name}
      name: instance-1
      preservedState:
        metadata:
          foo: bar
          instance_template: ${["igm-basic"].selfLink}
        disks:
          - deviceName: my-stateful-disk
            source: ${default.id}
            mode: READ_ONLY
variables:
  myImage:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-11
        project: debian-cloud

§Import

RegionPerInstanceConfig can be imported using any of these accepted formats:

  • projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{region_instance_group_manager}}/{{name}}

  • {{project}}/{{region}}/{{region_instance_group_manager}}/{{name}}

  • {{region}}/{{region_instance_group_manager}}/{{name}}

  • {{region_instance_group_manager}}/{{name}}

When using the pulumi import command, RegionPerInstanceConfig can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/regionPerInstanceConfig:RegionPerInstanceConfig default projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{region_instance_group_manager}}/{{name}}
$ pulumi import gcp:compute/regionPerInstanceConfig:RegionPerInstanceConfig default {{project}}/{{region}}/{{region_instance_group_manager}}/{{name}}
$ pulumi import gcp:compute/regionPerInstanceConfig:RegionPerInstanceConfig default {{region}}/{{region_instance_group_manager}}/{{name}}
$ pulumi import gcp:compute/regionPerInstanceConfig:RegionPerInstanceConfig default {{region_instance_group_manager}}/{{name}}

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments