@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
413 lines (412 loc) • 14.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 'A runtime template is a VM configuration that specifies a machine type and other characteristics of the VM,
* as well as common settings such as the network and whether public internet access is enabled. When you create
* a runtime, its VM is created according to the specifications of a runtime template.'
*
* To get more information about RuntimeTemplate, see:
*
* * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.notebookRuntimeTemplates)
* * How-to Guides
* * [Create a runtime template](https://cloud.google.com/colab/docs/create-runtime-template)
*
* ## Example Usage
*
* ### Colab Runtime Template Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const runtime_template = new gcp.colab.RuntimeTemplate("runtime-template", {
* name: "colab-runtime-template",
* displayName: "Runtime template basic",
* location: "us-central1",
* machineSpec: {
* machineType: "e2-standard-4",
* },
* networkSpec: {
* enableInternetAccess: true,
* },
* });
* ```
* ### Colab Runtime Template No Name
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const runtime_template = new gcp.colab.RuntimeTemplate("runtime-template", {
* displayName: "Runtime template no name",
* location: "us-central1",
* machineSpec: {
* machineType: "e2-standard-4",
* },
* networkSpec: {
* enableInternetAccess: true,
* },
* });
* ```
* ### Colab Runtime Template Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myNetwork = new gcp.compute.Network("my_network", {
* name: "colab-test-default",
* autoCreateSubnetworks: false,
* });
* const mySubnetwork = new gcp.compute.Subnetwork("my_subnetwork", {
* name: "colab-test-default",
* network: myNetwork.id,
* region: "us-central1",
* ipCidrRange: "10.0.1.0/24",
* });
* const runtime_template = new gcp.colab.RuntimeTemplate("runtime-template", {
* name: "colab-runtime-template",
* displayName: "Runtime template full",
* location: "us-central1",
* description: "Full runtime template",
* machineSpec: {
* machineType: "n1-standard-2",
* acceleratorType: "NVIDIA_TESLA_T4",
* acceleratorCount: 1,
* },
* dataPersistentDiskSpec: {
* diskType: "pd-standard",
* diskSizeGb: "200",
* },
* networkSpec: {
* enableInternetAccess: true,
* network: myNetwork.id,
* subnetwork: mySubnetwork.id,
* },
* labels: {
* k: "val",
* },
* idleShutdownConfig: {
* idleTimeout: "3600s",
* },
* eucConfig: {
* eucDisabled: false,
* },
* shieldedVmConfig: {
* enableSecureBoot: false,
* },
* networkTags: [
* "abc",
* "def",
* ],
* encryptionSpec: {
* kmsKeyName: "my-crypto-key",
* },
* });
* ```
*
* ## Import
*
* RuntimeTemplate can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/notebookRuntimeTemplates/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, RuntimeTemplate can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:colab/runtimeTemplate:RuntimeTemplate default projects/{{project}}/locations/{{location}}/notebookRuntimeTemplates/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:colab/runtimeTemplate:RuntimeTemplate default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:colab/runtimeTemplate:RuntimeTemplate default {{location}}/{{name}}
* ```
*/
export declare class RuntimeTemplate extends pulumi.CustomResource {
/**
* Get an existing RuntimeTemplate 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?: RuntimeTemplateState, opts?: pulumi.CustomResourceOptions): RuntimeTemplate;
/**
* Returns true if the given object is an instance of RuntimeTemplate. 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 RuntimeTemplate;
/**
* The configuration for the data disk of the runtime.
* Structure is documented below.
*/
readonly dataPersistentDiskSpec: pulumi.Output<outputs.colab.RuntimeTemplateDataPersistentDiskSpec>;
/**
* The description of the Runtime Template.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Required. The display name of the Runtime Template.
*/
readonly displayName: pulumi.Output<string>;
/**
* 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;
}>;
/**
* Customer-managed encryption key spec for the notebook runtime.
* Structure is documented below.
*/
readonly encryptionSpec: pulumi.Output<outputs.colab.RuntimeTemplateEncryptionSpec | undefined>;
/**
* EUC configuration of the NotebookRuntimeTemplate.
* Structure is documented below.
*/
readonly eucConfig: pulumi.Output<outputs.colab.RuntimeTemplateEucConfig>;
/**
* Notebook Idle Shutdown configuration for the runtime.
* Structure is documented below.
*/
readonly idleShutdownConfig: pulumi.Output<outputs.colab.RuntimeTemplateIdleShutdownConfig>;
/**
* Labels to identify and group the runtime template.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The location for the resource: https://cloud.google.com/colab/docs/locations
*/
readonly location: pulumi.Output<string>;
/**
* 'The machine configuration of the runtime.'
* Structure is documented below.
*/
readonly machineSpec: pulumi.Output<outputs.colab.RuntimeTemplateMachineSpec>;
/**
* The resource name of the Runtime Template
*/
readonly name: pulumi.Output<string>;
/**
* The network configuration for the runtime.
* Structure is documented below.
*/
readonly networkSpec: pulumi.Output<outputs.colab.RuntimeTemplateNetworkSpec>;
/**
* Applies the given Compute Engine tags to the runtime.
*/
readonly networkTags: pulumi.Output<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;
}>;
/**
* Runtime Shielded VM spec.
* Structure is documented below.
*/
readonly shieldedVmConfig: pulumi.Output<outputs.colab.RuntimeTemplateShieldedVmConfig>;
/**
* The notebook software configuration of the notebook runtime.
* Structure is documented below.
*/
readonly softwareConfig: pulumi.Output<outputs.colab.RuntimeTemplateSoftwareConfig>;
/**
* Create a RuntimeTemplate 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: RuntimeTemplateArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RuntimeTemplate resources.
*/
export interface RuntimeTemplateState {
/**
* The configuration for the data disk of the runtime.
* Structure is documented below.
*/
dataPersistentDiskSpec?: pulumi.Input<inputs.colab.RuntimeTemplateDataPersistentDiskSpec>;
/**
* The description of the Runtime Template.
*/
description?: pulumi.Input<string>;
/**
* Required. The display name of the Runtime Template.
*/
displayName?: pulumi.Input<string>;
/**
* 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>;
}>;
/**
* Customer-managed encryption key spec for the notebook runtime.
* Structure is documented below.
*/
encryptionSpec?: pulumi.Input<inputs.colab.RuntimeTemplateEncryptionSpec>;
/**
* EUC configuration of the NotebookRuntimeTemplate.
* Structure is documented below.
*/
eucConfig?: pulumi.Input<inputs.colab.RuntimeTemplateEucConfig>;
/**
* Notebook Idle Shutdown configuration for the runtime.
* Structure is documented below.
*/
idleShutdownConfig?: pulumi.Input<inputs.colab.RuntimeTemplateIdleShutdownConfig>;
/**
* Labels to identify and group the runtime template.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The location for the resource: https://cloud.google.com/colab/docs/locations
*/
location?: pulumi.Input<string>;
/**
* 'The machine configuration of the runtime.'
* Structure is documented below.
*/
machineSpec?: pulumi.Input<inputs.colab.RuntimeTemplateMachineSpec>;
/**
* The resource name of the Runtime Template
*/
name?: pulumi.Input<string>;
/**
* The network configuration for the runtime.
* Structure is documented below.
*/
networkSpec?: pulumi.Input<inputs.colab.RuntimeTemplateNetworkSpec>;
/**
* Applies the given Compute Engine tags to the runtime.
*/
networkTags?: pulumi.Input<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>;
}>;
/**
* Runtime Shielded VM spec.
* Structure is documented below.
*/
shieldedVmConfig?: pulumi.Input<inputs.colab.RuntimeTemplateShieldedVmConfig>;
/**
* The notebook software configuration of the notebook runtime.
* Structure is documented below.
*/
softwareConfig?: pulumi.Input<inputs.colab.RuntimeTemplateSoftwareConfig>;
}
/**
* The set of arguments for constructing a RuntimeTemplate resource.
*/
export interface RuntimeTemplateArgs {
/**
* The configuration for the data disk of the runtime.
* Structure is documented below.
*/
dataPersistentDiskSpec?: pulumi.Input<inputs.colab.RuntimeTemplateDataPersistentDiskSpec>;
/**
* The description of the Runtime Template.
*/
description?: pulumi.Input<string>;
/**
* Required. The display name of the Runtime Template.
*/
displayName: pulumi.Input<string>;
/**
* Customer-managed encryption key spec for the notebook runtime.
* Structure is documented below.
*/
encryptionSpec?: pulumi.Input<inputs.colab.RuntimeTemplateEncryptionSpec>;
/**
* EUC configuration of the NotebookRuntimeTemplate.
* Structure is documented below.
*/
eucConfig?: pulumi.Input<inputs.colab.RuntimeTemplateEucConfig>;
/**
* Notebook Idle Shutdown configuration for the runtime.
* Structure is documented below.
*/
idleShutdownConfig?: pulumi.Input<inputs.colab.RuntimeTemplateIdleShutdownConfig>;
/**
* Labels to identify and group the runtime template.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The location for the resource: https://cloud.google.com/colab/docs/locations
*/
location: pulumi.Input<string>;
/**
* 'The machine configuration of the runtime.'
* Structure is documented below.
*/
machineSpec?: pulumi.Input<inputs.colab.RuntimeTemplateMachineSpec>;
/**
* The resource name of the Runtime Template
*/
name?: pulumi.Input<string>;
/**
* The network configuration for the runtime.
* Structure is documented below.
*/
networkSpec?: pulumi.Input<inputs.colab.RuntimeTemplateNetworkSpec>;
/**
* Applies the given Compute Engine tags to the runtime.
*/
networkTags?: pulumi.Input<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>;
/**
* Runtime Shielded VM spec.
* Structure is documented below.
*/
shieldedVmConfig?: pulumi.Input<inputs.colab.RuntimeTemplateShieldedVmConfig>;
/**
* The notebook software configuration of the notebook runtime.
* Structure is documented below.
*/
softwareConfig?: pulumi.Input<inputs.colab.RuntimeTemplateSoftwareConfig>;
}