import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../../types/input"; import * as outputs from "../../types/output"; import * as enums from "../../types/enums"; /** * Creates an instance resource in the specified project using the data included in the request. */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. 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 Instance; /** * Controls for advanced machine-related behavior features. */ readonly advancedMachineFeatures: pulumi.Output; /** * Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding . */ readonly canIpForward: pulumi.Output; 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; /** * Whether the resource should be protected against deletion. */ readonly deletionProtection: pulumi.Output; /** * An optional description of this resource. Provide this property when you create the resource. */ readonly description: pulumi.Output; /** * Array of disks associated with this instance. Persistent disks must be created before you can assign them. */ readonly disks: pulumi.Output; /** * Enables display device for the instance. */ readonly displayDevice: pulumi.Output; /** * Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance. */ readonly fingerprint: pulumi.Output; /** * A list of the type and count of accelerator cards attached to the instance. */ readonly guestAccelerators: pulumi.Output; /** * Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. */ readonly hostname: pulumi.Output; /** * Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation. */ readonly instanceEncryptionKey: pulumi.Output; /** * KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. */ readonly keyRevocationActionType: pulumi.Output; /** * Type of the resource. Always compute#instance for instances. */ readonly kind: pulumi.Output; /** * A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance. */ readonly labelFingerprint: pulumi.Output; /** * Labels to apply to this instance. These can be later modified by the setLabels method. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; /** * Last start timestamp in RFC3339 text format. */ readonly lastStartTimestamp: pulumi.Output; /** * Last stop timestamp in RFC3339 text format. */ readonly lastStopTimestamp: pulumi.Output; /** * Last suspended timestamp in RFC3339 text format. */ readonly lastSuspendedTimestamp: pulumi.Output; /** * Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types. */ readonly machineType: pulumi.Output; /** * The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. */ readonly metadata: pulumi.Output; /** * Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". */ readonly minCpuPlatform: pulumi.Output; /** * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ readonly name: pulumi.Output; /** * An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance. */ readonly networkInterfaces: pulumi.Output; readonly networkPerformanceConfig: pulumi.Output; /** * Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. */ readonly params: pulumi.Output; /** * The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. */ readonly privateIpv6GoogleAccess: pulumi.Output; readonly project: pulumi.Output; /** * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ readonly requestId: pulumi.Output; /** * Specifies the reservations that this instance can consume from. */ readonly reservationAffinity: pulumi.Output; /** * Resource policies applied to this instance. */ readonly resourcePolicies: pulumi.Output; /** * Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field. */ readonly resourceStatus: pulumi.Output; /** * Reserved for future use. */ readonly satisfiesPzs: pulumi.Output; /** * Sets the scheduling options for this instance. */ readonly scheduling: pulumi.Output; /** * Server-defined URL for this resource. */ readonly selfLink: pulumi.Output; /** * A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information. */ readonly serviceAccounts: pulumi.Output; readonly shieldedInstanceConfig: pulumi.Output; readonly shieldedInstanceIntegrityPolicy: pulumi.Output; /** * Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate */ readonly sourceInstanceTemplate: pulumi.Output; /** * Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage */ readonly sourceMachineImage: pulumi.Output; /** * Source machine image encryption key when creating an instance from a machine image. */ readonly sourceMachineImageEncryptionKey: pulumi.Output; /** * Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. */ readonly startRestricted: pulumi.Output; /** * The status of the instance. 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. */ readonly status: pulumi.Output; /** * An optional, human-readable explanation of the status. */ readonly statusMessage: pulumi.Output; /** * Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field. */ readonly tags: pulumi.Output; readonly zone: pulumi.Output; /** * Create a Instance 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?: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Controls for advanced machine-related behavior features. */ advancedMachineFeatures?: pulumi.Input; /** * Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding . */ canIpForward?: pulumi.Input; confidentialInstanceConfig?: pulumi.Input; /** * Whether the resource should be protected against deletion. */ deletionProtection?: pulumi.Input; /** * An optional description of this resource. Provide this property when you create the resource. */ description?: pulumi.Input; /** * Array of disks associated with this instance. Persistent disks must be created before you can assign them. */ disks?: pulumi.Input[]>; /** * Enables display device for the instance. */ displayDevice?: pulumi.Input; /** * A list of the type and count of accelerator cards attached to the instance. */ guestAccelerators?: pulumi.Input[]>; /** * Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. */ hostname?: pulumi.Input; /** * Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation. */ instanceEncryptionKey?: pulumi.Input; /** * KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. */ keyRevocationActionType?: pulumi.Input; /** * Labels to apply to this instance. These can be later modified by the setLabels method. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types. */ machineType?: pulumi.Input; /** * The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. */ metadata?: pulumi.Input; /** * Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". */ minCpuPlatform?: pulumi.Input; /** * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ name?: pulumi.Input; /** * An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance. */ networkInterfaces?: pulumi.Input[]>; networkPerformanceConfig?: pulumi.Input; /** * Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. */ params?: pulumi.Input; /** * The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. */ privateIpv6GoogleAccess?: pulumi.Input; project?: pulumi.Input; /** * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ requestId?: pulumi.Input; /** * Specifies the reservations that this instance can consume from. */ reservationAffinity?: pulumi.Input; /** * Resource policies applied to this instance. */ resourcePolicies?: pulumi.Input[]>; /** * Sets the scheduling options for this instance. */ scheduling?: pulumi.Input; /** * A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information. */ serviceAccounts?: pulumi.Input[]>; shieldedInstanceConfig?: pulumi.Input; shieldedInstanceIntegrityPolicy?: pulumi.Input; /** * Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate */ sourceInstanceTemplate?: pulumi.Input; /** * Source machine image */ sourceMachineImage?: pulumi.Input; /** * Source machine image encryption key when creating an instance from a machine image. */ sourceMachineImageEncryptionKey?: pulumi.Input; /** * Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field. */ tags?: pulumi.Input; zone?: pulumi.Input; }