@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
105 lines (104 loc) • 3.68 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Get accelerator types 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.acceleratorTypes).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getV2AcceleratorTypes({});
* ```
*
* ### Configure Basic TPU VM With Available Type
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getV2AcceleratorTypes({});
* const availableGetV2RuntimeVersions = gcp.tpu.getV2RuntimeVersions({});
* const tpu = new gcp.tpu.V2Vm("tpu", {
* name: "test-tpu",
* zone: "us-central1-b",
* runtimeVersion: availableGetV2RuntimeVersions.then(availableGetV2RuntimeVersions => availableGetV2RuntimeVersions.versions?.[0]),
* acceleratorType: available.then(available => available.types?.[0]),
* });
* ```
*/
export declare function getV2AcceleratorTypes(args?: GetV2AcceleratorTypesArgs, opts?: pulumi.InvokeOptions): Promise<GetV2AcceleratorTypesResult>;
/**
* A collection of arguments for invoking getV2AcceleratorTypes.
*/
export interface GetV2AcceleratorTypesArgs {
/**
* The project to list types for. If it
* is not provided, the provider project is used.
*/
project?: string;
/**
* The zone to list types for. If it
* is not provided, the provider zone is used.
*/
zone?: string;
}
/**
* A collection of values returned by getV2AcceleratorTypes.
*/
export interface GetV2AcceleratorTypesResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly project: string;
/**
* The list of accelerator types available for the given project and zone.
*/
readonly types: string[];
readonly zone: string;
}
/**
* Get accelerator types 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.acceleratorTypes).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getV2AcceleratorTypes({});
* ```
*
* ### Configure Basic TPU VM With Available Type
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getV2AcceleratorTypes({});
* const availableGetV2RuntimeVersions = gcp.tpu.getV2RuntimeVersions({});
* const tpu = new gcp.tpu.V2Vm("tpu", {
* name: "test-tpu",
* zone: "us-central1-b",
* runtimeVersion: availableGetV2RuntimeVersions.then(availableGetV2RuntimeVersions => availableGetV2RuntimeVersions.versions?.[0]),
* acceleratorType: available.then(available => available.types?.[0]),
* });
* ```
*/
export declare function getV2AcceleratorTypesOutput(args?: GetV2AcceleratorTypesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetV2AcceleratorTypesResult>;
/**
* A collection of arguments for invoking getV2AcceleratorTypes.
*/
export interface GetV2AcceleratorTypesOutputArgs {
/**
* The project to list types for. If it
* is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The zone to list types for. If it
* is not provided, the provider zone is used.
*/
zone?: pulumi.Input<string>;
}