UNPKG

@pulumi/gcp

Version:

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

101 lines (100 loc) 3.26 kB
import * as pulumi from "@pulumi/pulumi"; /** * Get runtime versions available for a project. For more information see the [official documentation](https://cloud.google.com/tpu/docs/) and [API](https://cloud.google.com/tpu/docs/reference/rest/v2/projects.locations.runtimeVersions). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.tpu.getV2RuntimeVersions({}); * ``` * * ### Configure Basic TPU VM With Available Version * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.tpu.getV2RuntimeVersions({}); * const tpu = new gcp.tpu.V2Vm("tpu", { * name: "test-tpu", * zone: "us-central1-b", * runtimeVersion: available.then(available => available.versions?.[0]), * }); * ``` */ export declare function getV2RuntimeVersions(args?: GetV2RuntimeVersionsArgs, opts?: pulumi.InvokeOptions): Promise<GetV2RuntimeVersionsResult>; /** * A collection of arguments for invoking getV2RuntimeVersions. */ export interface GetV2RuntimeVersionsArgs { /** * The project to list versions for. If it * is not provided, the provider project is used. */ project?: string; /** * The zone to list versions for. If it * is not provided, the provider zone is used. */ zone?: string; } /** * A collection of values returned by getV2RuntimeVersions. */ export interface GetV2RuntimeVersionsResult { /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly project: string; /** * The list of runtime versions available for the given project and zone. */ readonly versions: string[]; readonly zone: string; } /** * Get runtime versions available for a project. For more information see the [official documentation](https://cloud.google.com/tpu/docs/) and [API](https://cloud.google.com/tpu/docs/reference/rest/v2/projects.locations.runtimeVersions). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.tpu.getV2RuntimeVersions({}); * ``` * * ### Configure Basic TPU VM With Available Version * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.tpu.getV2RuntimeVersions({}); * const tpu = new gcp.tpu.V2Vm("tpu", { * name: "test-tpu", * zone: "us-central1-b", * runtimeVersion: available.then(available => available.versions?.[0]), * }); * ``` */ export declare function getV2RuntimeVersionsOutput(args?: GetV2RuntimeVersionsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetV2RuntimeVersionsResult>; /** * A collection of arguments for invoking getV2RuntimeVersions. */ export interface GetV2RuntimeVersionsOutputArgs { /** * The project to list versions for. If it * is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * The zone to list versions for. If it * is not provided, the provider zone is used. */ zone?: pulumi.Input<string>; }