UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

593 lines (592 loc) • 27.8 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * ## Import * * Instance templates can be imported using any of these accepted formats: * * * `projects/{{project}}/regions/{{region}}/instanceTemplates/{{name}}` * * * `{{project}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, instance templates can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default projects/{{project}}/regions/{{region}}/instanceTemplates/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default {{project}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default {{name}} * ``` */ export declare class RegionInstanceTemplate extends pulumi.CustomResource { /** * Get an existing RegionInstanceTemplate 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<pulumi.ID>, state?: RegionInstanceTemplateState, opts?: pulumi.CustomResourceOptions): RegionInstanceTemplate; /** * Returns true if the given object is an instance of RegionInstanceTemplate. 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 RegionInstanceTemplate; /** * Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below */ readonly advancedMachineFeatures: pulumi.Output<outputs.compute.RegionInstanceTemplateAdvancedMachineFeatures | undefined>; /** * Whether to allow sending and receiving of * packets with non-matching source or destination IPs. This defaults to false. */ readonly canIpForward: pulumi.Output<boolean | undefined>; /** * Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below */ readonly confidentialInstanceConfig: pulumi.Output<outputs.compute.RegionInstanceTemplateConfidentialInstanceConfig>; /** * Creation timestamp in RFC3339 text format. */ readonly creationTimestamp: pulumi.Output<string>; /** * A brief description of this resource. */ readonly description: pulumi.Output<string | undefined>; /** * Disks to attach to instances created from this template. * This can be specified multiple times for multiple disks. Structure is * documented below. */ readonly disks: pulumi.Output<outputs.compute.RegionInstanceTemplateDisk[]>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance. * **Note**: `allowStoppingForUpdate` must be set to true in order to update this field. */ readonly enableDisplay: pulumi.Output<boolean | undefined>; /** * List of the type and count of accelerator cards attached to the instance. Structure documented below. */ readonly guestAccelerators: pulumi.Output<outputs.compute.RegionInstanceTemplateGuestAccelerator[] | undefined>; /** * A brief description to use for instances * created from this template. */ readonly instanceDescription: pulumi.Output<string | undefined>; /** * 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<string | undefined>; /** * A set of key/value label pairs to assign to instances * created from this template. * * **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; } | undefined>; /** * The machine type to create. * * To create a machine with a [custom type](https://cloud.google.com/dataproc/docs/concepts/compute/custom-machine-types) (such as extended memory), format the value like `custom-VCPUS-MEM_IN_MB` like `custom-6-20480` for 6 vCPU and 20GB of RAM. * * - - - */ readonly machineType: pulumi.Output<string>; /** * Metadata key/value pairs to make available from * within instances created from this template. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The unique fingerprint of the metadata. */ readonly metadataFingerprint: pulumi.Output<string>; /** * An alternative to using the * startup-script metadata key, mostly to match the computeInstance resource. * This replaces the startup-script metadata key on the created instance and * thus the two mechanisms are not allowed to be used simultaneously. */ readonly metadataStartupScript: pulumi.Output<string | undefined>; /** * Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as * `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). */ readonly minCpuPlatform: pulumi.Output<string | undefined>; readonly name: pulumi.Output<string>; /** * Creates a unique name beginning with the specified * prefix. Conflicts with `name`. Max length is 54 characters. * Prefixes with lengths longer than 37 characters will use a shortened * UUID that will be more prone to collisions. * * Resulting name for a `namePrefix` <= 37 characters: * `namePrefix` + YYYYmmddHHSSssss + 8 digit incremental counter * Resulting name for a `namePrefix` 38 - 54 characters: * `namePrefix` + YYmmdd + 3 digit incremental counter */ readonly namePrefix: pulumi.Output<string>; /** * Networks to attach to instances created from * this template. This can be specified multiple times for multiple networks. * Structure is documented below. */ readonly networkInterfaces: pulumi.Output<outputs.compute.RegionInstanceTemplateNetworkInterface[] | undefined>; /** * Configures network performance settings for the instance created from the * template. Structure is documented below. **Note**: `machineType` * must be a [supported type](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration), * the `image` used must include the [`GVNIC`](https://cloud.google.com/compute/docs/networking/using-gvnic#create-instance-gvnic-image) * in `guest-os-features`, and `network_interface.0.nic-type` must be `GVNIC` * in order for this setting to take effect. */ readonly networkPerformanceConfig: pulumi.Output<outputs.compute.RegionInstanceTemplateNetworkPerformanceConfig | undefined>; /** * numeric identifier of the resource. */ readonly numericId: pulumi.Output<string>; /** * Beta key/value pair represents partner metadata assigned to instance template where key represent a defined namespace and value is a json string represent the entries associted with the namespace. */ readonly partnerMetadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The ID of the project in which the resource belongs. If it * is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * The combination of labels configured directly on the resource and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * The Region in which the resource belongs. * If region is not provided, the provider region is used. */ readonly region: pulumi.Output<string>; /** * Specifies the reservations that this instance can consume from. * Structure is documented below. */ readonly reservationAffinity: pulumi.Output<outputs.compute.RegionInstanceTemplateReservationAffinity | undefined>; /** * A set of key/value resource manager tag pairs to bind to the instance. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. */ readonly resourceManagerTags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * - A list of selfLinks of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported. */ readonly resourcePolicies: pulumi.Output<string | undefined>; /** * The scheduling strategy to use. More details about * this configuration option are detailed below. */ readonly scheduling: pulumi.Output<outputs.compute.RegionInstanceTemplateScheduling>; /** * The URI of the created resource. */ readonly selfLink: pulumi.Output<string>; /** * Service account to attach to the instance. Structure is documented below. */ readonly serviceAccount: pulumi.Output<outputs.compute.RegionInstanceTemplateServiceAccount | undefined>; /** * Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. * **Note**: `shieldedInstanceConfig` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images). */ readonly shieldedInstanceConfig: pulumi.Output<outputs.compute.RegionInstanceTemplateShieldedInstanceConfig>; /** * Tags to attach to the instance. */ readonly tags: pulumi.Output<string[] | undefined>; /** * The unique fingerprint of the tags. */ readonly tagsFingerprint: pulumi.Output<string>; /** * Create a RegionInstanceTemplate 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: RegionInstanceTemplateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RegionInstanceTemplate resources. */ export interface RegionInstanceTemplateState { /** * Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below */ advancedMachineFeatures?: pulumi.Input<inputs.compute.RegionInstanceTemplateAdvancedMachineFeatures>; /** * Whether to allow sending and receiving of * packets with non-matching source or destination IPs. This defaults to false. */ canIpForward?: pulumi.Input<boolean>; /** * Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below */ confidentialInstanceConfig?: pulumi.Input<inputs.compute.RegionInstanceTemplateConfidentialInstanceConfig>; /** * Creation timestamp in RFC3339 text format. */ creationTimestamp?: pulumi.Input<string>; /** * A brief description of this resource. */ description?: pulumi.Input<string>; /** * Disks to attach to instances created from this template. * This can be specified multiple times for multiple disks. Structure is * documented below. */ disks?: pulumi.Input<pulumi.Input<inputs.compute.RegionInstanceTemplateDisk>[]>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance. * **Note**: `allowStoppingForUpdate` must be set to true in order to update this field. */ enableDisplay?: pulumi.Input<boolean>; /** * List of the type and count of accelerator cards attached to the instance. Structure documented below. */ guestAccelerators?: pulumi.Input<pulumi.Input<inputs.compute.RegionInstanceTemplateGuestAccelerator>[]>; /** * A brief description to use for instances * created from this template. */ instanceDescription?: pulumi.Input<string>; /** * Action to be taken when a customer's encryption key is revoked. Supports `STOP` and `NONE`, with `NONE` being the default. */ keyRevocationActionType?: pulumi.Input<string>; /** * A set of key/value label pairs to assign to instances * created from this template. * * **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<string>; }>; /** * The machine type to create. * * To create a machine with a [custom type](https://cloud.google.com/dataproc/docs/concepts/compute/custom-machine-types) (such as extended memory), format the value like `custom-VCPUS-MEM_IN_MB` like `custom-6-20480` for 6 vCPU and 20GB of RAM. * * - - - */ machineType?: pulumi.Input<string>; /** * Metadata key/value pairs to make available from * within instances created from this template. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The unique fingerprint of the metadata. */ metadataFingerprint?: pulumi.Input<string>; /** * An alternative to using the * startup-script metadata key, mostly to match the computeInstance resource. * This replaces the startup-script metadata key on the created instance and * thus the two mechanisms are not allowed to be used simultaneously. */ metadataStartupScript?: pulumi.Input<string>; /** * Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as * `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). */ minCpuPlatform?: pulumi.Input<string>; name?: pulumi.Input<string>; /** * Creates a unique name beginning with the specified * prefix. Conflicts with `name`. Max length is 54 characters. * Prefixes with lengths longer than 37 characters will use a shortened * UUID that will be more prone to collisions. * * Resulting name for a `namePrefix` <= 37 characters: * `namePrefix` + YYYYmmddHHSSssss + 8 digit incremental counter * Resulting name for a `namePrefix` 38 - 54 characters: * `namePrefix` + YYmmdd + 3 digit incremental counter */ namePrefix?: pulumi.Input<string>; /** * Networks to attach to instances created from * this template. This can be specified multiple times for multiple networks. * Structure is documented below. */ networkInterfaces?: pulumi.Input<pulumi.Input<inputs.compute.RegionInstanceTemplateNetworkInterface>[]>; /** * Configures network performance settings for the instance created from the * template. Structure is documented below. **Note**: `machineType` * must be a [supported type](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration), * the `image` used must include the [`GVNIC`](https://cloud.google.com/compute/docs/networking/using-gvnic#create-instance-gvnic-image) * in `guest-os-features`, and `network_interface.0.nic-type` must be `GVNIC` * in order for this setting to take effect. */ networkPerformanceConfig?: pulumi.Input<inputs.compute.RegionInstanceTemplateNetworkPerformanceConfig>; /** * numeric identifier of the resource. */ numericId?: pulumi.Input<string>; /** * Beta key/value pair represents partner metadata assigned to instance template where key represent a defined namespace and value is a json string represent the entries associted with the namespace. */ partnerMetadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The ID of the project in which the resource belongs. If it * is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * The combination of labels configured directly on the resource and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The Region in which the resource belongs. * If region is not provided, the provider region is used. */ region?: pulumi.Input<string>; /** * Specifies the reservations that this instance can consume from. * Structure is documented below. */ reservationAffinity?: pulumi.Input<inputs.compute.RegionInstanceTemplateReservationAffinity>; /** * A set of key/value resource manager tag pairs to bind to the instance. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. */ resourceManagerTags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * - A list of selfLinks of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported. */ resourcePolicies?: pulumi.Input<string>; /** * The scheduling strategy to use. More details about * this configuration option are detailed below. */ scheduling?: pulumi.Input<inputs.compute.RegionInstanceTemplateScheduling>; /** * The URI of the created resource. */ selfLink?: pulumi.Input<string>; /** * Service account to attach to the instance. Structure is documented below. */ serviceAccount?: pulumi.Input<inputs.compute.RegionInstanceTemplateServiceAccount>; /** * Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. * **Note**: `shieldedInstanceConfig` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images). */ shieldedInstanceConfig?: pulumi.Input<inputs.compute.RegionInstanceTemplateShieldedInstanceConfig>; /** * Tags to attach to the instance. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The unique fingerprint of the tags. */ tagsFingerprint?: pulumi.Input<string>; } /** * The set of arguments for constructing a RegionInstanceTemplate resource. */ export interface RegionInstanceTemplateArgs { /** * Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below */ advancedMachineFeatures?: pulumi.Input<inputs.compute.RegionInstanceTemplateAdvancedMachineFeatures>; /** * Whether to allow sending and receiving of * packets with non-matching source or destination IPs. This defaults to false. */ canIpForward?: pulumi.Input<boolean>; /** * Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below */ confidentialInstanceConfig?: pulumi.Input<inputs.compute.RegionInstanceTemplateConfidentialInstanceConfig>; /** * A brief description of this resource. */ description?: pulumi.Input<string>; /** * Disks to attach to instances created from this template. * This can be specified multiple times for multiple disks. Structure is * documented below. */ disks: pulumi.Input<pulumi.Input<inputs.compute.RegionInstanceTemplateDisk>[]>; /** * Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance. * **Note**: `allowStoppingForUpdate` must be set to true in order to update this field. */ enableDisplay?: pulumi.Input<boolean>; /** * List of the type and count of accelerator cards attached to the instance. Structure documented below. */ guestAccelerators?: pulumi.Input<pulumi.Input<inputs.compute.RegionInstanceTemplateGuestAccelerator>[]>; /** * A brief description to use for instances * created from this template. */ instanceDescription?: pulumi.Input<string>; /** * Action to be taken when a customer's encryption key is revoked. Supports `STOP` and `NONE`, with `NONE` being the default. */ keyRevocationActionType?: pulumi.Input<string>; /** * A set of key/value label pairs to assign to instances * created from this template. * * **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<string>; }>; /** * The machine type to create. * * To create a machine with a [custom type](https://cloud.google.com/dataproc/docs/concepts/compute/custom-machine-types) (such as extended memory), format the value like `custom-VCPUS-MEM_IN_MB` like `custom-6-20480` for 6 vCPU and 20GB of RAM. * * - - - */ machineType: pulumi.Input<string>; /** * Metadata key/value pairs to make available from * within instances created from this template. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * An alternative to using the * startup-script metadata key, mostly to match the computeInstance resource. * This replaces the startup-script metadata key on the created instance and * thus the two mechanisms are not allowed to be used simultaneously. */ metadataStartupScript?: pulumi.Input<string>; /** * Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as * `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). */ minCpuPlatform?: pulumi.Input<string>; name?: pulumi.Input<string>; /** * Creates a unique name beginning with the specified * prefix. Conflicts with `name`. Max length is 54 characters. * Prefixes with lengths longer than 37 characters will use a shortened * UUID that will be more prone to collisions. * * Resulting name for a `namePrefix` <= 37 characters: * `namePrefix` + YYYYmmddHHSSssss + 8 digit incremental counter * Resulting name for a `namePrefix` 38 - 54 characters: * `namePrefix` + YYmmdd + 3 digit incremental counter */ namePrefix?: pulumi.Input<string>; /** * Networks to attach to instances created from * this template. This can be specified multiple times for multiple networks. * Structure is documented below. */ networkInterfaces?: pulumi.Input<pulumi.Input<inputs.compute.RegionInstanceTemplateNetworkInterface>[]>; /** * Configures network performance settings for the instance created from the * template. Structure is documented below. **Note**: `machineType` * must be a [supported type](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration), * the `image` used must include the [`GVNIC`](https://cloud.google.com/compute/docs/networking/using-gvnic#create-instance-gvnic-image) * in `guest-os-features`, and `network_interface.0.nic-type` must be `GVNIC` * in order for this setting to take effect. */ networkPerformanceConfig?: pulumi.Input<inputs.compute.RegionInstanceTemplateNetworkPerformanceConfig>; /** * Beta key/value pair represents partner metadata assigned to instance template where key represent a defined namespace and value is a json string represent the entries associted with the namespace. */ partnerMetadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The ID of the project in which the resource belongs. If it * is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * The Region in which the resource belongs. * If region is not provided, the provider region is used. */ region?: pulumi.Input<string>; /** * Specifies the reservations that this instance can consume from. * Structure is documented below. */ reservationAffinity?: pulumi.Input<inputs.compute.RegionInstanceTemplateReservationAffinity>; /** * A set of key/value resource manager tag pairs to bind to the instance. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. */ resourceManagerTags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * - A list of selfLinks of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported. */ resourcePolicies?: pulumi.Input<string>; /** * The scheduling strategy to use. More details about * this configuration option are detailed below. */ scheduling?: pulumi.Input<inputs.compute.RegionInstanceTemplateScheduling>; /** * Service account to attach to the instance. Structure is documented below. */ serviceAccount?: pulumi.Input<inputs.compute.RegionInstanceTemplateServiceAccount>; /** * Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. * **Note**: `shieldedInstanceConfig` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images). */ shieldedInstanceConfig?: pulumi.Input<inputs.compute.RegionInstanceTemplateShieldedInstanceConfig>; /** * Tags to attach to the instance. */ tags?: pulumi.Input<pulumi.Input<string>[]>; }