Module tpu

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

Resources

Data Sources

Others

Resources

Resource Node

class Node extends CustomResource

A Cloud TPU instance.

To get more information about Node, see:

Example Usage - Tpu Node Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const available = gcp.tpu.getTensorflowVersions({});
const tpu = new gcp.tpu.Node("tpu", {
    acceleratorType: "v3-8",
    cidrBlock: "10.2.0.0/29",
    tensorflowVersion: available.versions[0],
    zone: "us-central1-b",
});

Example Usage - Tpu Node Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const available = gcp.tpu.getTensorflowVersions({});
const tpu = new gcp.tpu.Node("tpu", {
    acceleratorType: "v3-8",
    cidrBlock: "10.3.0.0/29",
    description: "Google Provider test TPU",
    labels: {
        foo: "bar",
    },
    network: "default",
    schedulingConfig: {
        preemptible: true,
    },
    tensorflowVersion: available.versions[0],
    zone: "us-central1-b",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/tpu_node.html.markdown.

constructor

new Node(name: string, args: NodeArgs, opts?: pulumi.CustomResourceOptions)

Create a Node resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NodeState, opts?: pulumi.CustomResourceOptions): Node

Get an existing Node resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Node. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property acceleratorType

public acceleratorType: pulumi.Output<string>;

property cidrBlock

public cidrBlock: pulumi.Output<string>;

property description

public description: pulumi.Output<string | undefined>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;

property name

public name: pulumi.Output<string>;

property network

public network: pulumi.Output<string>;

property networkEndpoints

public networkEndpoints: pulumi.Output<outputs.tpu.NodeNetworkEndpoint[]>;

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property schedulingConfig

public schedulingConfig: pulumi.Output<outputs.tpu.NodeSchedulingConfig | undefined>;

property serviceAccount

public serviceAccount: pulumi.Output<string>;

property tensorflowVersion

public tensorflowVersion: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;

Data Sources

Data Source getTensorflowVersions

getTensorflowVersions(args?: GetTensorflowVersionsArgs, opts?: pulumi.InvokeOptions): Promise<GetTensorflowVersionsResult> & GetTensorflowVersionsResult

Others

interface GetTensorflowVersionsArgs

interface GetTensorflowVersionsArgs

A collection of arguments for invoking getTensorflowVersions.

property project

project?: undefined | string;

property zone

zone?: undefined | string;

interface GetTensorflowVersionsResult

interface GetTensorflowVersionsResult

A collection of values returned by getTensorflowVersions.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property project

project: string;

property versions

versions: string[];

property zone

zone: string;

interface NodeArgs

interface NodeArgs

The set of arguments for constructing a Node resource.

property acceleratorType

acceleratorType: pulumi.Input<string>;

property cidrBlock

cidrBlock: pulumi.Input<string>;

property description

description?: pulumi.Input<string>;

property labels

labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

property name

name?: pulumi.Input<string>;

property network

network?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property schedulingConfig

schedulingConfig?: pulumi.Input<inputs.tpu.NodeSchedulingConfig>;

property tensorflowVersion

tensorflowVersion: pulumi.Input<string>;

property zone

zone: pulumi.Input<string>;

interface NodeState

interface NodeState

Input properties used for looking up and filtering Node resources.

property acceleratorType

acceleratorType?: pulumi.Input<string>;

property cidrBlock

cidrBlock?: pulumi.Input<string>;

property description

description?: pulumi.Input<string>;

property labels

labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

property name

name?: pulumi.Input<string>;

property network

network?: pulumi.Input<string>;

property networkEndpoints

networkEndpoints?: pulumi.Input<pulumi.Input<inputs.tpu.NodeNetworkEndpoint>[]>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property schedulingConfig

schedulingConfig?: pulumi.Input<inputs.tpu.NodeSchedulingConfig>;

property serviceAccount

serviceAccount?: pulumi.Input<string>;

property tensorflowVersion

tensorflowVersion?: pulumi.Input<string>;

property zone

zone?: pulumi.Input<string>;