Module tpu

@pulumi/gcp > tpu

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 = pulumi.output(gcp.TpuTensorflowVersions({}));
const tpu = new gcp.tpu.Node("tpu", {
    acceleratorType: "v3-8",
    cidrBlock: "10.2.0.0/29",
    tensorflowVersion: available.apply(available => 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 = pulumi.output(gcp.TpuTensorflowVersions({}));
const tpuNetwork = new gcp.compute.Network("tpu_network", {
    autoCreateSubnetworks: false,
});
const tpu = new gcp.tpu.Node("tpu", {
    acceleratorType: "v3-8",
    cidrBlock: "10.3.0.0/29",
    description: "Terraform Google Provider test TPU",
    labels: {
        foo: "bar",
    },
    network: tpuNetwork.name,
    schedulingConfig: {
        preemptible: true,
    },
    tensorflowVersion: available.apply(available => available.versions[0]),
    zone: "us-central1-b",
});

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

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. 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<{
    ipAddress: string;
    port: number;
}[]>;

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<{
    preemptible: boolean;
} | 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>;

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<{
    preemptible: pulumi.Input<boolean>;
}>;

property tensorflowVersion

tensorflowVersion: pulumi.Input<string>;

property zone

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<{
    ipAddress: pulumi.Input<string>;
    port: pulumi.Input<number>;
}>[]>;

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<{
    preemptible: pulumi.Input<boolean>;
}>;

property serviceAccount

serviceAccount?: pulumi.Input<string>;

property tensorflowVersion

tensorflowVersion?: pulumi.Input<string>;

property zone

zone?: pulumi.Input<string>;