import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a VM instance resource within GCE. For more information see * [the official documentation](https://cloud.google.com/compute/docs/instances) * and * [API](https://cloud.google.com/compute/docs/reference/latest/instances). * * This resource is specifically to create a compute instance from a given * `sourceMachineImage`. To create an instance without a machine image, use the * `gcp.compute.Instance` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const tpl = new gcp.compute.InstanceFromMachineImage("tpl", { * name: "instance-from-machine-image", * zone: "us-central1-a", * sourceMachineImage: "projects/PROJECT-ID/global/machineImages/NAME", * canIpForward: false, * labels: { * my_key: "my_value", * }, * }); * ``` */ export declare class InstanceFromMachineImage extends pulumi.CustomResource { /** * Get an existing InstanceFromMachineImage resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: InstanceFromMachineImageState, opts?: pulumi.CustomResourceOptions): InstanceFromMachineImage; /** * Returns true if the given object is an instance of InstanceFromMachineImage. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is InstanceFromMachineImage; /** * Controls for advanced machine-related behavior features. */ readonly advancedMachineFeatures: pulumi.Output; readonly allowStoppingForUpdate: pulumi.Output; /** * List of disks attached to the instance */ readonly attachedDisks: pulumi.Output; /** * The boot disk for the instance. */ readonly bootDisks: pulumi.Output; /** * Whether sending and receiving of packets with non-matching source or destination IPs is allowed. */ readonly canIpForward: pulumi.Output; /** * The Confidential VM config being used by the instance. onHostMaintenance has to be set to TERMINATE or this will fail to create. */ readonly confidentialInstanceConfig: pulumi.Output; /** * The CPU platform used by this instance. */ readonly cpuPlatform: pulumi.Output; /** * Creation timestamp in RFC3339 text format. */ readonly creationTimestamp: pulumi.Output; /** * 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](https://cloud.google.com/compute/docs/instances/instance-life-cycle). */ readonly currentStatus: pulumi.Output; /** * Whether deletion protection is enabled on this instance. */ readonly deletionProtection: pulumi.Output; /** * A brief description of the resource. */ readonly description: pulumi.Output; /** * Desired status of the instance. Either "RUNNING", "SUSPENDED" or "TERMINATED". */ readonly desiredStatus: pulumi.Output; readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Whether the instance has virtual displays enabled. */ readonly enableDisplay: pulumi.Output; /** * List of the type and count of accelerator cards attached to the instance. */ readonly guestAccelerators: pulumi.Output; /** * 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. */ readonly hostname: pulumi.Output; /** * Encryption key used to provide data encryption on the given instance. */ readonly instanceEncryptionKey: pulumi.Output; /** * The server-assigned unique identifier of this instance. */ readonly instanceId: pulumi.Output; /** * Action to be taken when a customer's encryption key is revoked. Supports "STOP" and "NONE", with "NONE" being the default. */ readonly keyRevocationActionType: pulumi.Output; /** * The unique fingerprint of the labels. */ readonly labelFingerprint: pulumi.Output; /** * A set of key/value label pairs assigned to the instance. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field 'effective_labels' for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; /** * The machine type to create. */ readonly machineType: pulumi.Output; /** * Metadata key/value pairs made available within the instance. */ readonly metadata: pulumi.Output<{ [key: string]: string; }>; /** * The unique fingerprint of the metadata. */ readonly metadataFingerprint: pulumi.Output; /** * Metadata startup scripts made available within the instance. */ readonly metadataStartupScript: pulumi.Output; /** * The minimum CPU platform specified for the VM instance. */ readonly minCpuPlatform: pulumi.Output; /** * A unique name for the resource, required by GCE. * Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The networks attached to the instance. */ readonly networkInterfaces: pulumi.Output; /** * Configures network performance settings for the instance. If not specified, the instance will be created with its default network performance configuration. */ readonly networkPerformanceConfig: pulumi.Output; /** * Stores additional params passed with the request, but not persisted as part of resource payload. */ readonly params: pulumi.Output; /** * Partner Metadata Map made available within the instance. */ readonly partnerMetadata: pulumi.Output<{ [key: string]: string; }>; /** * The ID of the project in which the resource belongs. If selfLink is provided, this value is ignored. If neither selfLink nor project are provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Specifies the reservations that this instance can consume from. */ readonly reservationAffinity: pulumi.Output; /** * A list of selfLinks of resource policies to attach to the instance. Currently a max of 1 resource policy is supported. */ readonly resourcePolicies: pulumi.Output; /** * The scheduling strategy being used by the instance. */ readonly scheduling: pulumi.Output; /** * The scratch disks attached to the instance. */ readonly scratchDisks: pulumi.Output; /** * The URI of the created resource. */ readonly selfLink: pulumi.Output; /** * The service account to attach to the instance. */ readonly serviceAccount: pulumi.Output; /** * The shielded vm config being used by the instance. */ readonly shieldedInstanceConfig: pulumi.Output; /** * Name or self link of a machine * image to create the instance based on. * * - - - */ readonly sourceMachineImage: pulumi.Output; /** * Encryption key for the source machine image. */ readonly sourceMachineImageEncryptionKey: pulumi.Output; /** * The list of tags attached to the instance. */ readonly tags: pulumi.Output; /** * The unique fingerprint of the tags. */ readonly tagsFingerprint: pulumi.Output; /** * 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 "bootDisk", "attachedDisk", and "scratchDisk" fields. */ readonly zone: pulumi.Output; /** * Create a InstanceFromMachineImage resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: InstanceFromMachineImageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering InstanceFromMachineImage resources. */ export interface InstanceFromMachineImageState { /** * Controls for advanced machine-related behavior features. */ advancedMachineFeatures?: pulumi.Input; allowStoppingForUpdate?: pulumi.Input; /** * List of disks attached to the instance */ attachedDisks?: pulumi.Input[]>; /** * The boot disk for the instance. */ bootDisks?: pulumi.Input[]>; /** * Whether sending and receiving of packets with non-matching source or destination IPs is allowed. */ canIpForward?: pulumi.Input; /** * The Confidential VM config being used by the instance. onHostMaintenance has to be set to TERMINATE or this will fail to create. */ confidentialInstanceConfig?: pulumi.Input; /** * The CPU platform used by this instance. */ cpuPlatform?: pulumi.Input; /** * Creation timestamp in RFC3339 text format. */ creationTimestamp?: pulumi.Input; /** * 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](https://cloud.google.com/compute/docs/instances/instance-life-cycle). */ currentStatus?: pulumi.Input; /** * Whether deletion protection is enabled on this instance. */ deletionProtection?: pulumi.Input; /** * A brief description of the resource. */ description?: pulumi.Input; /** * Desired status of the instance. Either "RUNNING", "SUSPENDED" or "TERMINATED". */ desiredStatus?: pulumi.Input; effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Whether the instance has virtual displays enabled. */ enableDisplay?: pulumi.Input; /** * List of the type and count of accelerator cards attached to the instance. */ guestAccelerators?: pulumi.Input[]>; /** * 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. */ hostname?: pulumi.Input; /** * Encryption key used to provide data encryption on the given instance. */ instanceEncryptionKey?: pulumi.Input; /** * The server-assigned unique identifier of this instance. */ instanceId?: pulumi.Input; /** * Action to be taken when a customer's encryption key is revoked. Supports "STOP" and "NONE", with "NONE" being the default. */ keyRevocationActionType?: pulumi.Input; /** * The unique fingerprint of the labels. */ labelFingerprint?: pulumi.Input; /** * A set of key/value label pairs assigned to the instance. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field 'effective_labels' for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The machine type to create. */ machineType?: pulumi.Input; /** * Metadata key/value pairs made available within the instance. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The unique fingerprint of the metadata. */ metadataFingerprint?: pulumi.Input; /** * Metadata startup scripts made available within the instance. */ metadataStartupScript?: pulumi.Input; /** * The minimum CPU platform specified for the VM instance. */ minCpuPlatform?: pulumi.Input; /** * A unique name for the resource, required by GCE. * Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The networks attached to the instance. */ networkInterfaces?: pulumi.Input[]>; /** * Configures network performance settings for the instance. If not specified, the instance will be created with its default network performance configuration. */ networkPerformanceConfig?: pulumi.Input; /** * Stores additional params passed with the request, but not persisted as part of resource payload. */ params?: pulumi.Input; /** * Partner Metadata Map made available within the instance. */ partnerMetadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID of the project in which the resource belongs. If selfLink is provided, this value is ignored. If neither selfLink nor project are provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Specifies the reservations that this instance can consume from. */ reservationAffinity?: pulumi.Input; /** * A list of selfLinks of resource policies to attach to the instance. Currently a max of 1 resource policy is supported. */ resourcePolicies?: pulumi.Input; /** * The scheduling strategy being used by the instance. */ scheduling?: pulumi.Input; /** * The scratch disks attached to the instance. */ scratchDisks?: pulumi.Input[]>; /** * The URI of the created resource. */ selfLink?: pulumi.Input; /** * The service account to attach to the instance. */ serviceAccount?: pulumi.Input; /** * The shielded vm config being used by the instance. */ shieldedInstanceConfig?: pulumi.Input; /** * Name or self link of a machine * image to create the instance based on. * * - - - */ sourceMachineImage?: pulumi.Input; /** * Encryption key for the source machine image. */ sourceMachineImageEncryptionKey?: pulumi.Input; /** * The list of tags attached to the instance. */ tags?: pulumi.Input[]>; /** * The unique fingerprint of the tags. */ tagsFingerprint?: pulumi.Input; /** * 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 "bootDisk", "attachedDisk", and "scratchDisk" fields. */ zone?: pulumi.Input; } /** * The set of arguments for constructing a InstanceFromMachineImage resource. */ export interface InstanceFromMachineImageArgs { /** * Controls for advanced machine-related behavior features. */ advancedMachineFeatures?: pulumi.Input; allowStoppingForUpdate?: pulumi.Input; /** * Whether sending and receiving of packets with non-matching source or destination IPs is allowed. */ canIpForward?: pulumi.Input; /** * The Confidential VM config being used by the instance. onHostMaintenance has to be set to TERMINATE or this will fail to create. */ confidentialInstanceConfig?: pulumi.Input; /** * Whether deletion protection is enabled on this instance. */ deletionProtection?: pulumi.Input; /** * A brief description of the resource. */ description?: pulumi.Input; /** * Desired status of the instance. Either "RUNNING", "SUSPENDED" or "TERMINATED". */ desiredStatus?: pulumi.Input; /** * Whether the instance has virtual displays enabled. */ enableDisplay?: pulumi.Input; /** * List of the type and count of accelerator cards attached to the instance. */ guestAccelerators?: pulumi.Input[]>; /** * 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. */ hostname?: pulumi.Input; /** * Encryption key used to provide data encryption on the given instance. */ instanceEncryptionKey?: pulumi.Input; /** * Action to be taken when a customer's encryption key is revoked. Supports "STOP" and "NONE", with "NONE" being the default. */ keyRevocationActionType?: pulumi.Input; /** * A set of key/value label pairs assigned to the instance. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field 'effective_labels' for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The machine type to create. */ machineType?: pulumi.Input; /** * Metadata key/value pairs made available within the instance. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Metadata startup scripts made available within the instance. */ metadataStartupScript?: pulumi.Input; /** * The minimum CPU platform specified for the VM instance. */ minCpuPlatform?: pulumi.Input; /** * A unique name for the resource, required by GCE. * Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The networks attached to the instance. */ networkInterfaces?: pulumi.Input[]>; /** * Configures network performance settings for the instance. If not specified, the instance will be created with its default network performance configuration. */ networkPerformanceConfig?: pulumi.Input; /** * Stores additional params passed with the request, but not persisted as part of resource payload. */ params?: pulumi.Input; /** * Partner Metadata Map made available within the instance. */ partnerMetadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID of the project in which the resource belongs. If selfLink is provided, this value is ignored. If neither selfLink nor project are provided, the provider project is used. */ project?: pulumi.Input; /** * Specifies the reservations that this instance can consume from. */ reservationAffinity?: pulumi.Input; /** * A list of selfLinks of resource policies to attach to the instance. Currently a max of 1 resource policy is supported. */ resourcePolicies?: pulumi.Input; /** * The scheduling strategy being used by the instance. */ scheduling?: pulumi.Input; /** * The service account to attach to the instance. */ serviceAccount?: pulumi.Input; /** * The shielded vm config being used by the instance. */ shieldedInstanceConfig?: pulumi.Input; /** * Name or self link of a machine * image to create the instance based on. * * - - - */ sourceMachineImage: pulumi.Input; /** * Encryption key for the source machine image. */ sourceMachineImageEncryptionKey?: pulumi.Input; /** * The list of tags attached to the instance. */ tags?: pulumi.Input[]>; /** * 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 "bootDisk", "attachedDisk", and "scratchDisk" fields. */ zone?: pulumi.Input; }