@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
248 lines (247 loc) • 10.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* > **Note**: Global instance templates can be used in any region. To lower the impact of outages outside your region and gain data residency within your region, use google_compute_region_instance_template.
*
* Get information about a VM instance template resource within GCE. For more information see
* [the official documentation](https://cloud.google.com/compute/docs/instance-templates)
* and
* [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates).
*/
export declare function getInstanceTemplate(args?: GetInstanceTemplateArgs, opts?: pulumi.InvokeOptions): Promise<GetInstanceTemplateResult>;
/**
* A collection of arguments for invoking getInstanceTemplate.
*/
export interface GetInstanceTemplateArgs {
/**
* A filter to retrieve the instance templates.
* See [API filter parameter documentation](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/list#body.QUERY_PARAMETERS.filter) for reference.
* If multiple instance templates match, either adjust the filter or specify `mostRecent`.
* One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
filter?: string;
/**
* If `filter` is provided, ensures the most recent template is returned when multiple instance templates match. One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
mostRecent?: boolean;
/**
* The name of the instance template. One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
name?: string;
/**
* The ID of the project in which the resource belongs.
* If `project` is not provided, the provider project is used.
*/
project?: string;
/**
* The selfLinkUnique URI of the instance template. One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
selfLinkUnique?: string;
}
/**
* A collection of values returned by getInstanceTemplate.
*/
export interface GetInstanceTemplateResult {
readonly advancedMachineFeatures: outputs.compute.GetInstanceTemplateAdvancedMachineFeature[];
/**
* Whether to allow sending and receiving of
* packets with non-matching source or destination IPs. This defaults to false.
*/
readonly canIpForward: boolean;
/**
* Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below
*/
readonly confidentialInstanceConfigs: outputs.compute.GetInstanceTemplateConfidentialInstanceConfig[];
/**
* Creation timestamp in RFC3339 text format.
*/
readonly creationTimestamp: string;
/**
* A brief description of this resource.
*/
readonly description: string;
/**
* Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
readonly disks: outputs.compute.GetInstanceTemplateDisk[];
readonly effectiveLabels: {
[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: boolean;
readonly filter?: string;
/**
* List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
readonly guestAccelerators: outputs.compute.GetInstanceTemplateGuestAccelerator[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* A brief description to use for instances
* created from this template.
*/
readonly instanceDescription: string;
/**
* Action to be taken when a customer's encryption key is revoked.
*/
readonly keyRevocationActionType: string;
/**
* (Optional) A set of ket/value label pairs to assign to disk created from
* this template
*/
readonly labels: {
[key: string]: string;
};
/**
* The machine type to create.
*/
readonly machineType: string;
/**
* Metadata key/value pairs to make available from
* within instances created from this template.
*/
readonly metadata: {
[key: string]: string;
};
/**
* The unique fingerprint of the metadata.
*/
readonly metadataFingerprint: 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: 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).
*/
readonly minCpuPlatform: string;
readonly mostRecent?: boolean;
/**
* The name of the instance template. If you leave
* this blank, the provider will auto-generate a unique name.
*/
readonly name?: string;
/**
* Creates a unique name beginning with the specified
* prefix. Conflicts with `name`.
*/
readonly namePrefix: string;
/**
* The URL of the network attachment that this interface should connect to in the following format: projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}. s
*/
readonly networkInterfaces: outputs.compute.GetInstanceTemplateNetworkInterface[];
/**
* The network performance configuration setting
* for the instance, if set. Structure is documented below.
*/
readonly networkPerformanceConfigs: outputs.compute.GetInstanceTemplateNetworkPerformanceConfig[];
readonly numericId: string;
readonly partnerMetadata: {
[key: string]: string;
};
/**
* The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
readonly project?: string;
readonly pulumiLabels: {
[key: string]: string;
};
/**
* An instance template is a global resource that is not
* bound to a zone or a region. However, you can still specify some regional
* resources in an instance template, which restricts the template to the
* region where that resource resides. For example, a custom `subnetwork`
* resource is tied to a specific region. Defaults to the region of the
* Provider if no value is given.
*/
readonly region: string;
readonly reservationAffinities: outputs.compute.GetInstanceTemplateReservationAffinity[];
readonly resourceManagerTags: {
[key: string]: string;
};
/**
* (Optional) -- A list of short names of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
*/
readonly resourcePolicies: string[];
/**
* The scheduling strategy to use. More details about
* this configuration option are detailed below.
*/
readonly schedulings: outputs.compute.GetInstanceTemplateScheduling[];
/**
* The URI of the created resource.
*/
readonly selfLink: string;
/**
* A special URI of the created resource that uniquely identifies this instance template with the following format: `projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}}`
* Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.
*/
readonly selfLinkUnique?: string;
/**
* Service account to attach to the instance. Structure is documented below.
*/
readonly serviceAccounts: outputs.compute.GetInstanceTemplateServiceAccount[];
/**
* 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 shieldedInstanceConfigs: outputs.compute.GetInstanceTemplateShieldedInstanceConfig[];
/**
* Tags to attach to the instance.
*/
readonly tags: string[];
/**
* The unique fingerprint of the tags.
*/
readonly tagsFingerprint: string;
}
/**
* > **Note**: Global instance templates can be used in any region. To lower the impact of outages outside your region and gain data residency within your region, use google_compute_region_instance_template.
*
* Get information about a VM instance template resource within GCE. For more information see
* [the official documentation](https://cloud.google.com/compute/docs/instance-templates)
* and
* [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates).
*/
export declare function getInstanceTemplateOutput(args?: GetInstanceTemplateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetInstanceTemplateResult>;
/**
* A collection of arguments for invoking getInstanceTemplate.
*/
export interface GetInstanceTemplateOutputArgs {
/**
* A filter to retrieve the instance templates.
* See [API filter parameter documentation](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/list#body.QUERY_PARAMETERS.filter) for reference.
* If multiple instance templates match, either adjust the filter or specify `mostRecent`.
* One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
filter?: pulumi.Input<string>;
/**
* If `filter` is provided, ensures the most recent template is returned when multiple instance templates match. One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
mostRecent?: pulumi.Input<boolean>;
/**
* The name of the instance template. One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If `project` is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The selfLinkUnique URI of the instance template. One of `name`, `filter` or `selfLinkUnique` must be provided.
*/
selfLinkUnique?: pulumi.Input<string>;
}