gcp.compute.InstanceFromMachineImage

Explore with Pulumi AI

Manages a VM instance resource within GCE. For more information see the official documentation and API.

This resource is specifically to create a compute instance from a given source_machine_image. To create an instance without a machine image, use the gcp.compute.Instance resource.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var tpl = new Gcp.Compute.InstanceFromMachineImage("tpl", new()
    {
        Zone = "us-central1-a",
        SourceMachineImage = "projects/PROJECT-ID/global/machineImages/NAME",
        CanIpForward = false,
        Labels = 
        {
            { "my_key", "my_value" },
        },
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.NewInstanceFromMachineImage(ctx, "tpl", &compute.InstanceFromMachineImageArgs{
			Zone:               pulumi.String("us-central1-a"),
			SourceMachineImage: pulumi.String("projects/PROJECT-ID/global/machineImages/NAME"),
			CanIpForward:       pulumi.Bool(false),
			Labels: pulumi.StringMap{
				"my_key": pulumi.String("my_value"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.InstanceFromMachineImage;
import com.pulumi.gcp.compute.InstanceFromMachineImageArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var tpl = new InstanceFromMachineImage("tpl", InstanceFromMachineImageArgs.builder()        
            .zone("us-central1-a")
            .sourceMachineImage("projects/PROJECT-ID/global/machineImages/NAME")
            .canIpForward(false)
            .labels(Map.of("my_key", "my_value"))
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

tpl = gcp.compute.InstanceFromMachineImage("tpl",
    zone="us-central1-a",
    source_machine_image="projects/PROJECT-ID/global/machineImages/NAME",
    can_ip_forward=False,
    labels={
        "my_key": "my_value",
    },
    opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const tpl = new gcp.compute.InstanceFromMachineImage("tpl", {
    zone: "us-central1-a",
    sourceMachineImage: "projects/PROJECT-ID/global/machineImages/NAME",
    canIpForward: false,
    labels: {
        my_key: "my_value",
    },
}, {
    provider: google_beta,
});
resources:
  tpl:
    type: gcp:compute:InstanceFromMachineImage
    properties:
      zone: us-central1-a
      sourceMachineImage: projects/PROJECT-ID/global/machineImages/NAME
      # Override fields from machine image
      canIpForward: false
      labels:
        my_key: my_value
    options:
      provider: ${["google-beta"]}

Create InstanceFromMachineImage Resource

new InstanceFromMachineImage(name: string, args: InstanceFromMachineImageArgs, opts?: CustomResourceOptions);
@overload
def InstanceFromMachineImage(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             advanced_machine_features: Optional[InstanceFromMachineImageAdvancedMachineFeaturesArgs] = None,
                             allow_stopping_for_update: Optional[bool] = None,
                             can_ip_forward: Optional[bool] = None,
                             confidential_instance_config: Optional[InstanceFromMachineImageConfidentialInstanceConfigArgs] = None,
                             deletion_protection: Optional[bool] = None,
                             description: Optional[str] = None,
                             desired_status: Optional[str] = None,
                             enable_display: Optional[bool] = None,
                             guest_accelerators: Optional[Sequence[InstanceFromMachineImageGuestAcceleratorArgs]] = None,
                             hostname: Optional[str] = None,
                             labels: Optional[Mapping[str, str]] = None,
                             machine_type: Optional[str] = None,
                             metadata: Optional[Mapping[str, str]] = None,
                             metadata_startup_script: Optional[str] = None,
                             min_cpu_platform: Optional[str] = None,
                             name: Optional[str] = None,
                             network_interfaces: Optional[Sequence[InstanceFromMachineImageNetworkInterfaceArgs]] = None,
                             network_performance_config: Optional[InstanceFromMachineImageNetworkPerformanceConfigArgs] = None,
                             project: Optional[str] = None,
                             reservation_affinity: Optional[InstanceFromMachineImageReservationAffinityArgs] = None,
                             resource_policies: Optional[str] = None,
                             scheduling: Optional[InstanceFromMachineImageSchedulingArgs] = None,
                             service_account: Optional[InstanceFromMachineImageServiceAccountArgs] = None,
                             shielded_instance_config: Optional[InstanceFromMachineImageShieldedInstanceConfigArgs] = None,
                             source_machine_image: Optional[str] = None,
                             tags: Optional[Sequence[str]] = None,
                             zone: Optional[str] = None)
@overload
def InstanceFromMachineImage(resource_name: str,
                             args: InstanceFromMachineImageArgs,
                             opts: Optional[ResourceOptions] = None)
func NewInstanceFromMachineImage(ctx *Context, name string, args InstanceFromMachineImageArgs, opts ...ResourceOption) (*InstanceFromMachineImage, error)
public InstanceFromMachineImage(string name, InstanceFromMachineImageArgs args, CustomResourceOptions? opts = null)
public InstanceFromMachineImage(String name, InstanceFromMachineImageArgs args)
public InstanceFromMachineImage(String name, InstanceFromMachineImageArgs args, CustomResourceOptions options)
type: gcp:compute:InstanceFromMachineImage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args InstanceFromMachineImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args InstanceFromMachineImageArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args InstanceFromMachineImageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceFromMachineImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args InstanceFromMachineImageArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

InstanceFromMachineImage Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The InstanceFromMachineImage resource accepts the following input properties:

SourceMachineImage string

Name or self link of a machine image to create the instance based on.


AdvancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

CanIpForward bool

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

ConfidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

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

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators List<InstanceFromMachineImageGuestAcceleratorArgs>

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

Hostname string

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

Labels Dictionary<string, string>

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

MachineType string

The machine type to create.

Metadata Dictionary<string, string>

Metadata key/value pairs made available within the instance.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces List<InstanceFromMachineImageNetworkInterfaceArgs>

The networks attached to the instance.

NetworkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ReservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

ResourcePolicies string

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

ServiceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

Tags List<string>

The list of tags attached to the instance.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

SourceMachineImage string

Name or self link of a machine image to create the instance based on.


AdvancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

CanIpForward bool

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

ConfidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

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

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators []InstanceFromMachineImageGuestAcceleratorArgs

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

Hostname string

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

Labels map[string]string

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

MachineType string

The machine type to create.

Metadata map[string]string

Metadata key/value pairs made available within the instance.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces []InstanceFromMachineImageNetworkInterfaceArgs

The networks attached to the instance.

NetworkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ReservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

ResourcePolicies string

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

ServiceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

Tags []string

The list of tags attached to the instance.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

sourceMachineImage String

Name or self link of a machine image to create the instance based on.


advancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

allowStoppingForUpdate Boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

canIpForward Boolean

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

confidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

deletionProtection Boolean

Whether deletion protection is enabled on this instance.

description String

A brief description of the resource.

desiredStatus String

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

enableDisplay Boolean

Whether the instance has virtual displays enabled.

guestAccelerators List<InstanceFromMachineImageGuestAcceleratorArgs>

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

hostname String

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

labels Map<String,String>

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

machineType String

The machine type to create.

metadata Map<String,String>

Metadata key/value pairs made available within the instance.

metadataStartupScript String

Metadata startup scripts made available within the instance.

minCpuPlatform String

The minimum CPU platform specified for the VM instance.

name String

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces List<InstanceFromMachineImageNetworkInterfaceArgs>

The networks attached to the instance.

networkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

project String

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

resourcePolicies String

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

serviceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

shieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

tags List<String>

The list of tags attached to the instance.

zone String

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

sourceMachineImage string

Name or self link of a machine image to create the instance based on.


advancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

allowStoppingForUpdate boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

canIpForward boolean

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

confidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

deletionProtection boolean

Whether deletion protection is enabled on this instance.

description string

A brief description of the resource.

desiredStatus string

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

enableDisplay boolean

Whether the instance has virtual displays enabled.

guestAccelerators InstanceFromMachineImageGuestAcceleratorArgs[]

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

hostname string

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

labels {[key: string]: string}

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

machineType string

The machine type to create.

metadata {[key: string]: string}

Metadata key/value pairs made available within the instance.

metadataStartupScript string

Metadata startup scripts made available within the instance.

minCpuPlatform string

The minimum CPU platform specified for the VM instance.

name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces InstanceFromMachineImageNetworkInterfaceArgs[]

The networks attached to the instance.

networkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

resourcePolicies string

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

serviceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

shieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

tags string[]

The list of tags attached to the instance.

zone string

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

source_machine_image str

Name or self link of a machine image to create the instance based on.


advanced_machine_features InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

allow_stopping_for_update bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

can_ip_forward bool

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

confidential_instance_config InstanceFromMachineImageConfidentialInstanceConfigArgs

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

deletion_protection bool

Whether deletion protection is enabled on this instance.

description str

A brief description of the resource.

desired_status str

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

enable_display bool

Whether the instance has virtual displays enabled.

guest_accelerators Sequence[InstanceFromMachineImageGuestAcceleratorArgs]

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

hostname str

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

labels Mapping[str, str]

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

machine_type str

The machine type to create.

metadata Mapping[str, str]

Metadata key/value pairs made available within the instance.

metadata_startup_script str

Metadata startup scripts made available within the instance.

min_cpu_platform str

The minimum CPU platform specified for the VM instance.

name str

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

network_interfaces Sequence[InstanceFromMachineImageNetworkInterfaceArgs]

The networks attached to the instance.

network_performance_config InstanceFromMachineImageNetworkPerformanceConfigArgs

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

project str

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservation_affinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

resource_policies str

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

service_account InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

shielded_instance_config InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

tags Sequence[str]

The list of tags attached to the instance.

zone str

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

sourceMachineImage String

Name or self link of a machine image to create the instance based on.


advancedMachineFeatures Property Map

Controls for advanced machine-related behavior features.

allowStoppingForUpdate Boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

canIpForward Boolean

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

confidentialInstanceConfig Property Map

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

deletionProtection Boolean

Whether deletion protection is enabled on this instance.

description String

A brief description of the resource.

desiredStatus String

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

enableDisplay Boolean

Whether the instance has virtual displays enabled.

guestAccelerators List<Property Map>

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

hostname String

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

labels Map<String>

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

machineType String

The machine type to create.

metadata Map<String>

Metadata key/value pairs made available within the instance.

metadataStartupScript String

Metadata startup scripts made available within the instance.

minCpuPlatform String

The minimum CPU platform specified for the VM instance.

name String

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces List<Property Map>

The networks attached to the instance.

networkPerformanceConfig Property Map

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

project String

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservationAffinity Property Map

Specifies the reservations that this instance can consume from.

resourcePolicies String

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling Property Map

The scheduling strategy being used by the instance.

serviceAccount Property Map

The service account to attach to the instance.

shieldedInstanceConfig Property Map

The shielded vm config being used by the instance.

tags List<String>

The list of tags attached to the instance.

zone String

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

Outputs

All input properties are implicitly available as output properties. Additionally, the InstanceFromMachineImage resource produces the following output properties:

AttachedDisks List<InstanceFromMachineImageAttachedDisk>

List of disks attached to the instance

BootDisks List<InstanceFromMachineImageBootDisk>

The boot disk for the instance.

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.

Id string

The provider-assigned unique ID for this managed resource.

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.

ScratchDisks List<InstanceFromMachineImageScratchDisk>

The scratch disks attached to the instance.

SelfLink string

The URI of the created resource.

TagsFingerprint string

The unique fingerprint of the tags.

AttachedDisks []InstanceFromMachineImageAttachedDisk

List of disks attached to the instance

BootDisks []InstanceFromMachineImageBootDisk

The boot disk for the instance.

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.

Id string

The provider-assigned unique ID for this managed resource.

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.

ScratchDisks []InstanceFromMachineImageScratchDisk

The scratch disks attached to the instance.

SelfLink string

The URI of the created resource.

TagsFingerprint string

The unique fingerprint of the tags.

attachedDisks List<InstanceFromMachineImageAttachedDisk>

List of disks attached to the instance

bootDisks List<InstanceFromMachineImageBootDisk>

The boot disk for the instance.

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.

id String

The provider-assigned unique ID for this managed resource.

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.

scratchDisks List<InstanceFromMachineImageScratchDisk>

The scratch disks attached to the instance.

selfLink String

The URI of the created resource.

tagsFingerprint String

The unique fingerprint of the tags.

attachedDisks InstanceFromMachineImageAttachedDisk[]

List of disks attached to the instance

bootDisks InstanceFromMachineImageBootDisk[]

The boot disk for the instance.

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.

id string

The provider-assigned unique ID for this managed resource.

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.

scratchDisks InstanceFromMachineImageScratchDisk[]

The scratch disks attached to the instance.

selfLink string

The URI of the created resource.

tagsFingerprint string

The unique fingerprint of the tags.

attached_disks Sequence[InstanceFromMachineImageAttachedDisk]

List of disks attached to the instance

boot_disks Sequence[InstanceFromMachineImageBootDisk]

The boot disk for the instance.

cpu_platform str

The CPU platform used by this instance.

current_status str

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.

id str

The provider-assigned unique ID for this managed resource.

instance_id str

The server-assigned unique identifier of this instance.

label_fingerprint str

The unique fingerprint of the labels.

metadata_fingerprint str

The unique fingerprint of the metadata.

scratch_disks Sequence[InstanceFromMachineImageScratchDisk]

The scratch disks attached to the instance.

self_link str

The URI of the created resource.

tags_fingerprint str

The unique fingerprint of the tags.

attachedDisks List<Property Map>

List of disks attached to the instance

bootDisks List<Property Map>

The boot disk for the instance.

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.

id String

The provider-assigned unique ID for this managed resource.

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.

scratchDisks List<Property Map>

The scratch disks attached to the instance.

selfLink String

The URI of the created resource.

tagsFingerprint String

The unique fingerprint of the tags.

Look up Existing InstanceFromMachineImage Resource

Get an existing InstanceFromMachineImage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: InstanceFromMachineImageState, opts?: CustomResourceOptions): InstanceFromMachineImage
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        advanced_machine_features: Optional[InstanceFromMachineImageAdvancedMachineFeaturesArgs] = None,
        allow_stopping_for_update: Optional[bool] = None,
        attached_disks: Optional[Sequence[InstanceFromMachineImageAttachedDiskArgs]] = None,
        boot_disks: Optional[Sequence[InstanceFromMachineImageBootDiskArgs]] = None,
        can_ip_forward: Optional[bool] = None,
        confidential_instance_config: Optional[InstanceFromMachineImageConfidentialInstanceConfigArgs] = None,
        cpu_platform: Optional[str] = None,
        current_status: Optional[str] = None,
        deletion_protection: Optional[bool] = None,
        description: Optional[str] = None,
        desired_status: Optional[str] = None,
        enable_display: Optional[bool] = None,
        guest_accelerators: Optional[Sequence[InstanceFromMachineImageGuestAcceleratorArgs]] = None,
        hostname: Optional[str] = None,
        instance_id: Optional[str] = None,
        label_fingerprint: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        machine_type: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        metadata_fingerprint: Optional[str] = None,
        metadata_startup_script: Optional[str] = None,
        min_cpu_platform: Optional[str] = None,
        name: Optional[str] = None,
        network_interfaces: Optional[Sequence[InstanceFromMachineImageNetworkInterfaceArgs]] = None,
        network_performance_config: Optional[InstanceFromMachineImageNetworkPerformanceConfigArgs] = None,
        project: Optional[str] = None,
        reservation_affinity: Optional[InstanceFromMachineImageReservationAffinityArgs] = None,
        resource_policies: Optional[str] = None,
        scheduling: Optional[InstanceFromMachineImageSchedulingArgs] = None,
        scratch_disks: Optional[Sequence[InstanceFromMachineImageScratchDiskArgs]] = None,
        self_link: Optional[str] = None,
        service_account: Optional[InstanceFromMachineImageServiceAccountArgs] = None,
        shielded_instance_config: Optional[InstanceFromMachineImageShieldedInstanceConfigArgs] = None,
        source_machine_image: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        tags_fingerprint: Optional[str] = None,
        zone: Optional[str] = None) -> InstanceFromMachineImage
func GetInstanceFromMachineImage(ctx *Context, name string, id IDInput, state *InstanceFromMachineImageState, opts ...ResourceOption) (*InstanceFromMachineImage, error)
public static InstanceFromMachineImage Get(string name, Input<string> id, InstanceFromMachineImageState? state, CustomResourceOptions? opts = null)
public static InstanceFromMachineImage get(String name, Output<String> id, InstanceFromMachineImageState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AdvancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

AttachedDisks List<InstanceFromMachineImageAttachedDiskArgs>

List of disks attached to the instance

BootDisks List<InstanceFromMachineImageBootDiskArgs>

The boot disk for the instance.

CanIpForward bool

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

ConfidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

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.

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

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

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators List<InstanceFromMachineImageGuestAcceleratorArgs>

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

Hostname string

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

InstanceId string

The server-assigned unique identifier of this instance.

LabelFingerprint string

The unique fingerprint of the labels.

Labels Dictionary<string, string>

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

MachineType string

The machine type to create.

Metadata Dictionary<string, string>

Metadata key/value pairs made available within the instance.

MetadataFingerprint string

The unique fingerprint of the metadata.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces List<InstanceFromMachineImageNetworkInterfaceArgs>

The networks attached to the instance.

NetworkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ReservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

ResourcePolicies string

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

ScratchDisks List<InstanceFromMachineImageScratchDiskArgs>

The scratch disks attached to the instance.

SelfLink string

The URI of the created resource.

ServiceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

SourceMachineImage string

Name or self link of a machine image to create the instance based on.


Tags List<string>

The list of tags attached to the instance.

TagsFingerprint string

The unique fingerprint of the tags.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

AdvancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

AttachedDisks []InstanceFromMachineImageAttachedDiskArgs

List of disks attached to the instance

BootDisks []InstanceFromMachineImageBootDiskArgs

The boot disk for the instance.

CanIpForward bool

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

ConfidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

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.

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

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

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators []InstanceFromMachineImageGuestAcceleratorArgs

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

Hostname string

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

InstanceId string

The server-assigned unique identifier of this instance.

LabelFingerprint string

The unique fingerprint of the labels.

Labels map[string]string

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

MachineType string

The machine type to create.

Metadata map[string]string

Metadata key/value pairs made available within the instance.

MetadataFingerprint string

The unique fingerprint of the metadata.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces []InstanceFromMachineImageNetworkInterfaceArgs

The networks attached to the instance.

NetworkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ReservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

ResourcePolicies string

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

ScratchDisks []InstanceFromMachineImageScratchDiskArgs

The scratch disks attached to the instance.

SelfLink string

The URI of the created resource.

ServiceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

SourceMachineImage string

Name or self link of a machine image to create the instance based on.


Tags []string

The list of tags attached to the instance.

TagsFingerprint string

The unique fingerprint of the tags.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

advancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

allowStoppingForUpdate Boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attachedDisks List<InstanceFromMachineImageAttachedDiskArgs>

List of disks attached to the instance

bootDisks List<InstanceFromMachineImageBootDiskArgs>

The boot disk for the instance.

canIpForward Boolean

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

confidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

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.

deletionProtection Boolean

Whether deletion protection is enabled on this instance.

description String

A brief description of the resource.

desiredStatus String

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

enableDisplay Boolean

Whether the instance has virtual displays enabled.

guestAccelerators List<InstanceFromMachineImageGuestAcceleratorArgs>

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

hostname String

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

instanceId String

The server-assigned unique identifier of this instance.

labelFingerprint String

The unique fingerprint of the labels.

labels Map<String,String>

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

machineType String

The machine type to create.

metadata Map<String,String>

Metadata key/value pairs made available within the instance.

metadataFingerprint String

The unique fingerprint of the metadata.

metadataStartupScript String

Metadata startup scripts made available within the instance.

minCpuPlatform String

The minimum CPU platform specified for the VM instance.

name String

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces List<InstanceFromMachineImageNetworkInterfaceArgs>

The networks attached to the instance.

networkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

project String

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

resourcePolicies String

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

scratchDisks List<InstanceFromMachineImageScratchDiskArgs>

The scratch disks attached to the instance.

selfLink String

The URI of the created resource.

serviceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

shieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

sourceMachineImage String

Name or self link of a machine image to create the instance based on.


tags List<String>

The list of tags attached to the instance.

tagsFingerprint String

The unique fingerprint of the tags.

zone String

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

advancedMachineFeatures InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

allowStoppingForUpdate boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attachedDisks InstanceFromMachineImageAttachedDiskArgs[]

List of disks attached to the instance

bootDisks InstanceFromMachineImageBootDiskArgs[]

The boot disk for the instance.

canIpForward boolean

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

confidentialInstanceConfig InstanceFromMachineImageConfidentialInstanceConfigArgs

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

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.

deletionProtection boolean

Whether deletion protection is enabled on this instance.

description string

A brief description of the resource.

desiredStatus string

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

enableDisplay boolean

Whether the instance has virtual displays enabled.

guestAccelerators InstanceFromMachineImageGuestAcceleratorArgs[]

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

hostname string

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

instanceId string

The server-assigned unique identifier of this instance.

labelFingerprint string

The unique fingerprint of the labels.

labels {[key: string]: string}

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

machineType string

The machine type to create.

metadata {[key: string]: string}

Metadata key/value pairs made available within the instance.

metadataFingerprint string

The unique fingerprint of the metadata.

metadataStartupScript string

Metadata startup scripts made available within the instance.

minCpuPlatform string

The minimum CPU platform specified for the VM instance.

name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces InstanceFromMachineImageNetworkInterfaceArgs[]

The networks attached to the instance.

networkPerformanceConfig InstanceFromMachineImageNetworkPerformanceConfigArgs

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

project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservationAffinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

resourcePolicies string

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

scratchDisks InstanceFromMachineImageScratchDiskArgs[]

The scratch disks attached to the instance.

selfLink string

The URI of the created resource.

serviceAccount InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

shieldedInstanceConfig InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

sourceMachineImage string

Name or self link of a machine image to create the instance based on.


tags string[]

The list of tags attached to the instance.

tagsFingerprint string

The unique fingerprint of the tags.

zone string

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

advanced_machine_features InstanceFromMachineImageAdvancedMachineFeaturesArgs

Controls for advanced machine-related behavior features.

allow_stopping_for_update bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attached_disks Sequence[InstanceFromMachineImageAttachedDiskArgs]

List of disks attached to the instance

boot_disks Sequence[InstanceFromMachineImageBootDiskArgs]

The boot disk for the instance.

can_ip_forward bool

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

confidential_instance_config InstanceFromMachineImageConfidentialInstanceConfigArgs

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

cpu_platform str

The CPU platform used by this instance.

current_status str

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.

deletion_protection bool

Whether deletion protection is enabled on this instance.

description str

A brief description of the resource.

desired_status str

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

enable_display bool

Whether the instance has virtual displays enabled.

guest_accelerators Sequence[InstanceFromMachineImageGuestAcceleratorArgs]

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

hostname str

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

instance_id str

The server-assigned unique identifier of this instance.

label_fingerprint str

The unique fingerprint of the labels.

labels Mapping[str, str]

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

machine_type str

The machine type to create.

metadata Mapping[str, str]

Metadata key/value pairs made available within the instance.

metadata_fingerprint str

The unique fingerprint of the metadata.

metadata_startup_script str

Metadata startup scripts made available within the instance.

min_cpu_platform str

The minimum CPU platform specified for the VM instance.

name str

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

network_interfaces Sequence[InstanceFromMachineImageNetworkInterfaceArgs]

The networks attached to the instance.

network_performance_config InstanceFromMachineImageNetworkPerformanceConfigArgs

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

project str

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservation_affinity InstanceFromMachineImageReservationAffinityArgs

Specifies the reservations that this instance can consume from.

resource_policies str

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling InstanceFromMachineImageSchedulingArgs

The scheduling strategy being used by the instance.

scratch_disks Sequence[InstanceFromMachineImageScratchDiskArgs]

The scratch disks attached to the instance.

self_link str

The URI of the created resource.

service_account InstanceFromMachineImageServiceAccountArgs

The service account to attach to the instance.

shielded_instance_config InstanceFromMachineImageShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

source_machine_image str

Name or self link of a machine image to create the instance based on.


tags Sequence[str]

The list of tags attached to the instance.

tags_fingerprint str

The unique fingerprint of the tags.

zone str

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

advancedMachineFeatures Property Map

Controls for advanced machine-related behavior features.

allowStoppingForUpdate Boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attachedDisks List<Property Map>

List of disks attached to the instance

bootDisks List<Property Map>

The boot disk for the instance.

canIpForward Boolean

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

confidentialInstanceConfig Property Map

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

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.

deletionProtection Boolean

Whether deletion protection is enabled on this instance.

description String

A brief description of the resource.

desiredStatus String

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

enableDisplay Boolean

Whether the instance has virtual displays enabled.

guestAccelerators List<Property Map>

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

hostname String

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, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

instanceId String

The server-assigned unique identifier of this instance.

labelFingerprint String

The unique fingerprint of the labels.

labels Map<String>

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

machineType String

The machine type to create.

metadata Map<String>

Metadata key/value pairs made available within the instance.

metadataFingerprint String

The unique fingerprint of the metadata.

metadataStartupScript String

Metadata startup scripts made available within the instance.

minCpuPlatform String

The minimum CPU platform specified for the VM instance.

name String

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces List<Property Map>

The networks attached to the instance.

networkPerformanceConfig Property Map

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

project String

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

reservationAffinity Property Map

Specifies the reservations that this instance can consume from.

resourcePolicies String

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

scheduling Property Map

The scheduling strategy being used by the instance.

scratchDisks List<Property Map>

The scratch disks attached to the instance.

selfLink String

The URI of the created resource.

serviceAccount Property Map

The service account to attach to the instance.

shieldedInstanceConfig Property Map

The shielded vm config being used by the instance.

sourceMachineImage String

Name or self link of a machine image to create the instance based on.


tags List<String>

The list of tags attached to the instance.

tagsFingerprint String

The unique fingerprint of the tags.

zone String

The zone that the machine should be created in. If not set, the provider zone is used.

In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Warning: *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.

Supporting Types

InstanceFromMachineImageAdvancedMachineFeatures

InstanceFromMachineImageAttachedDisk

InstanceFromMachineImageBootDisk

InstanceFromMachineImageBootDiskInitializeParams

Image string
Labels Dictionary<string, object>
Size int
Type string
Image string
Labels map[string]interface{}
Size int
Type string
image String
labels Map<String,Object>
size Integer
type String
image string
labels {[key: string]: any}
size number
type string
image str
labels Mapping[str, Any]
size int
type str
image String
labels Map<Any>
size Number
type String

InstanceFromMachineImageConfidentialInstanceConfig

InstanceFromMachineImageGuestAccelerator

Count int
Type string
Count int
Type string
count Integer
type String
count number
type string
count int
type str
count Number
type String

InstanceFromMachineImageNetworkInterface

accessConfigs List<Property Map>
aliasIpRanges List<Property Map>
ipv6AccessConfigs List<Property Map>
ipv6AccessType String
name String

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

network String
networkIp String
nicType String
queueCount Number
stackType String
subnetwork String
subnetworkProject String

InstanceFromMachineImageNetworkInterfaceAccessConfig

InstanceFromMachineImageNetworkInterfaceAliasIpRange

InstanceFromMachineImageNetworkInterfaceIpv6AccessConfig

InstanceFromMachineImageNetworkPerformanceConfig

InstanceFromMachineImageReservationAffinity

InstanceFromMachineImageReservationAffinitySpecificReservation

Key string
Values List<string>
Key string
Values []string
key String
values List<String>
key string
values string[]
key str
values Sequence[str]
key String
values List<String>

InstanceFromMachineImageScheduling

InstanceFromMachineImageSchedulingMaxRunDuration

Seconds int
Nanos int
Seconds int
Nanos int
seconds Integer
nanos Integer
seconds number
nanos number
seconds int
nanos int
seconds Number
nanos Number

InstanceFromMachineImageSchedulingNodeAffinity

Key string
Operator string
Values List<string>
Key string
Operator string
Values []string
key String
operator String
values List<String>
key string
operator string
values string[]
key str
operator str
values Sequence[str]
key String
operator String
values List<String>

InstanceFromMachineImageScratchDisk

Interface string
Size int
Interface string
Size int
interface_ String
size Integer
interface string
size number
interface String
size Number

InstanceFromMachineImageServiceAccount

Scopes List<string>
Email string
Scopes []string
Email string
scopes List<String>
email String
scopes string[]
email string
scopes Sequence[str]
email str
scopes List<String>
email String

InstanceFromMachineImageShieldedInstanceConfig

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.