gcp.tpu.Node
Explore with Pulumi AI
A Cloud TPU instance.
To get more information about Node, see:
- API documentation
- How-to Guides
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", {
    name: "test-tpu",
    zone: "us-central1-b",
    acceleratorType: "v3-8",
    tensorflowVersion: available.then(available => available.versions?.[0]),
    cidrBlock: "10.2.0.0/29",
});
import pulumi
import pulumi_gcp as gcp
available = gcp.tpu.get_tensorflow_versions()
tpu = gcp.tpu.Node("tpu",
    name="test-tpu",
    zone="us-central1-b",
    accelerator_type="v3-8",
    tensorflow_version=available.versions[0],
    cidr_block="10.2.0.0/29")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/tpu"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		available, err := tpu.GetTensorflowVersions(ctx, &tpu.GetTensorflowVersionsArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = tpu.NewNode(ctx, "tpu", &tpu.NodeArgs{
			Name:              pulumi.String("test-tpu"),
			Zone:              pulumi.String("us-central1-b"),
			AcceleratorType:   pulumi.String("v3-8"),
			TensorflowVersion: pulumi.String(available.Versions[0]),
			CidrBlock:         pulumi.String("10.2.0.0/29"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var available = Gcp.Tpu.GetTensorflowVersions.Invoke();
    var tpu = new Gcp.Tpu.Node("tpu", new()
    {
        Name = "test-tpu",
        Zone = "us-central1-b",
        AcceleratorType = "v3-8",
        TensorflowVersion = available.Apply(getTensorflowVersionsResult => getTensorflowVersionsResult.Versions[0]),
        CidrBlock = "10.2.0.0/29",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.tpu.TpuFunctions;
import com.pulumi.gcp.tpu.inputs.GetTensorflowVersionsArgs;
import com.pulumi.gcp.tpu.Node;
import com.pulumi.gcp.tpu.NodeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var available = TpuFunctions.getTensorflowVersions();
        var tpu = new Node("tpu", NodeArgs.builder()
            .name("test-tpu")
            .zone("us-central1-b")
            .acceleratorType("v3-8")
            .tensorflowVersion(available.applyValue(getTensorflowVersionsResult -> getTensorflowVersionsResult.versions()[0]))
            .cidrBlock("10.2.0.0/29")
            .build());
    }
}
resources:
  tpu:
    type: gcp:tpu:Node
    properties:
      name: test-tpu
      zone: us-central1-b
      acceleratorType: v3-8
      tensorflowVersion: ${available.versions[0]}
      cidrBlock: 10.2.0.0/29
variables:
  available:
    fn::invoke:
      function: gcp:tpu:getTensorflowVersions
      arguments: {}
Tpu Node Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const available = gcp.tpu.getTensorflowVersions({});
const network = new gcp.compute.Network("network", {name: "tpu-node-network"});
const serviceRange = new gcp.compute.GlobalAddress("service_range", {
    name: "my-global-address",
    purpose: "VPC_PEERING",
    addressType: "INTERNAL",
    prefixLength: 16,
    network: network.id,
});
const privateServiceConnection = new gcp.servicenetworking.Connection("private_service_connection", {
    network: network.id,
    service: "servicenetworking.googleapis.com",
    reservedPeeringRanges: [serviceRange.name],
});
const tpu = new gcp.tpu.Node("tpu", {
    name: "test-tpu",
    zone: "us-central1-b",
    acceleratorType: "v3-8",
    tensorflowVersion: available.then(available => available.versions?.[0]),
    description: "Google Provider test TPU",
    useServiceNetworking: true,
    network: privateServiceConnection.network,
    labels: {
        foo: "bar",
    },
    schedulingConfig: {
        preemptible: true,
    },
});
import pulumi
import pulumi_gcp as gcp
available = gcp.tpu.get_tensorflow_versions()
network = gcp.compute.Network("network", name="tpu-node-network")
service_range = gcp.compute.GlobalAddress("service_range",
    name="my-global-address",
    purpose="VPC_PEERING",
    address_type="INTERNAL",
    prefix_length=16,
    network=network.id)
private_service_connection = gcp.servicenetworking.Connection("private_service_connection",
    network=network.id,
    service="servicenetworking.googleapis.com",
    reserved_peering_ranges=[service_range.name])
tpu = gcp.tpu.Node("tpu",
    name="test-tpu",
    zone="us-central1-b",
    accelerator_type="v3-8",
    tensorflow_version=available.versions[0],
    description="Google Provider test TPU",
    use_service_networking=True,
    network=private_service_connection.network,
    labels={
        "foo": "bar",
    },
    scheduling_config={
        "preemptible": True,
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/tpu"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		available, err := tpu.GetTensorflowVersions(ctx, &tpu.GetTensorflowVersionsArgs{}, nil)
		if err != nil {
			return err
		}
		network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
			Name: pulumi.String("tpu-node-network"),
		})
		if err != nil {
			return err
		}
		serviceRange, err := compute.NewGlobalAddress(ctx, "service_range", &compute.GlobalAddressArgs{
			Name:         pulumi.String("my-global-address"),
			Purpose:      pulumi.String("VPC_PEERING"),
			AddressType:  pulumi.String("INTERNAL"),
			PrefixLength: pulumi.Int(16),
			Network:      network.ID(),
		})
		if err != nil {
			return err
		}
		privateServiceConnection, err := servicenetworking.NewConnection(ctx, "private_service_connection", &servicenetworking.ConnectionArgs{
			Network: network.ID(),
			Service: pulumi.String("servicenetworking.googleapis.com"),
			ReservedPeeringRanges: pulumi.StringArray{
				serviceRange.Name,
			},
		})
		if err != nil {
			return err
		}
		_, err = tpu.NewNode(ctx, "tpu", &tpu.NodeArgs{
			Name:                 pulumi.String("test-tpu"),
			Zone:                 pulumi.String("us-central1-b"),
			AcceleratorType:      pulumi.String("v3-8"),
			TensorflowVersion:    pulumi.String(available.Versions[0]),
			Description:          pulumi.String("Google Provider test TPU"),
			UseServiceNetworking: pulumi.Bool(true),
			Network:              privateServiceConnection.Network,
			Labels: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			SchedulingConfig: &tpu.NodeSchedulingConfigArgs{
				Preemptible: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var available = Gcp.Tpu.GetTensorflowVersions.Invoke();
    var network = new Gcp.Compute.Network("network", new()
    {
        Name = "tpu-node-network",
    });
    var serviceRange = new Gcp.Compute.GlobalAddress("service_range", new()
    {
        Name = "my-global-address",
        Purpose = "VPC_PEERING",
        AddressType = "INTERNAL",
        PrefixLength = 16,
        Network = network.Id,
    });
    var privateServiceConnection = new Gcp.ServiceNetworking.Connection("private_service_connection", new()
    {
        Network = network.Id,
        Service = "servicenetworking.googleapis.com",
        ReservedPeeringRanges = new[]
        {
            serviceRange.Name,
        },
    });
    var tpu = new Gcp.Tpu.Node("tpu", new()
    {
        Name = "test-tpu",
        Zone = "us-central1-b",
        AcceleratorType = "v3-8",
        TensorflowVersion = available.Apply(getTensorflowVersionsResult => getTensorflowVersionsResult.Versions[0]),
        Description = "Google Provider test TPU",
        UseServiceNetworking = true,
        Network = privateServiceConnection.Network,
        Labels = 
        {
            { "foo", "bar" },
        },
        SchedulingConfig = new Gcp.Tpu.Inputs.NodeSchedulingConfigArgs
        {
            Preemptible = true,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.tpu.TpuFunctions;
import com.pulumi.gcp.tpu.inputs.GetTensorflowVersionsArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.tpu.Node;
import com.pulumi.gcp.tpu.NodeArgs;
import com.pulumi.gcp.tpu.inputs.NodeSchedulingConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var available = TpuFunctions.getTensorflowVersions();
        var network = new Network("network", NetworkArgs.builder()
            .name("tpu-node-network")
            .build());
        var serviceRange = new GlobalAddress("serviceRange", GlobalAddressArgs.builder()
            .name("my-global-address")
            .purpose("VPC_PEERING")
            .addressType("INTERNAL")
            .prefixLength(16)
            .network(network.id())
            .build());
        var privateServiceConnection = new Connection("privateServiceConnection", ConnectionArgs.builder()
            .network(network.id())
            .service("servicenetworking.googleapis.com")
            .reservedPeeringRanges(serviceRange.name())
            .build());
        var tpu = new Node("tpu", NodeArgs.builder()
            .name("test-tpu")
            .zone("us-central1-b")
            .acceleratorType("v3-8")
            .tensorflowVersion(available.applyValue(getTensorflowVersionsResult -> getTensorflowVersionsResult.versions()[0]))
            .description("Google Provider test TPU")
            .useServiceNetworking(true)
            .network(privateServiceConnection.network())
            .labels(Map.of("foo", "bar"))
            .schedulingConfig(NodeSchedulingConfigArgs.builder()
                .preemptible(true)
                .build())
            .build());
    }
}
resources:
  tpu:
    type: gcp:tpu:Node
    properties:
      name: test-tpu
      zone: us-central1-b
      acceleratorType: v3-8
      tensorflowVersion: ${available.versions[0]}
      description: Google Provider test TPU
      useServiceNetworking: true
      network: ${privateServiceConnection.network}
      labels:
        foo: bar
      schedulingConfig:
        preemptible: true
  network:
    type: gcp:compute:Network
    properties:
      name: tpu-node-network
  serviceRange:
    type: gcp:compute:GlobalAddress
    name: service_range
    properties:
      name: my-global-address
      purpose: VPC_PEERING
      addressType: INTERNAL
      prefixLength: 16
      network: ${network.id}
  privateServiceConnection:
    type: gcp:servicenetworking:Connection
    name: private_service_connection
    properties:
      network: ${network.id}
      service: servicenetworking.googleapis.com
      reservedPeeringRanges:
        - ${serviceRange.name}
variables:
  available:
    fn::invoke:
      function: gcp:tpu:getTensorflowVersions
      arguments: {}
Create Node Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Node(name: string, args: NodeArgs, opts?: CustomResourceOptions);@overload
def Node(resource_name: str,
         args: NodeArgs,
         opts: Optional[ResourceOptions] = None)
@overload
def Node(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         accelerator_type: Optional[str] = None,
         tensorflow_version: Optional[str] = None,
         cidr_block: Optional[str] = None,
         description: Optional[str] = None,
         labels: Optional[Mapping[str, str]] = None,
         name: Optional[str] = None,
         network: Optional[str] = None,
         project: Optional[str] = None,
         scheduling_config: Optional[NodeSchedulingConfigArgs] = None,
         use_service_networking: Optional[bool] = None,
         zone: Optional[str] = None)func NewNode(ctx *Context, name string, args NodeArgs, opts ...ResourceOption) (*Node, error)public Node(string name, NodeArgs args, CustomResourceOptions? opts = null)type: gcp:tpu:Node
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var nodeResource = new Gcp.Tpu.Node("nodeResource", new()
{
    AcceleratorType = "string",
    TensorflowVersion = "string",
    CidrBlock = "string",
    Description = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
    Network = "string",
    Project = "string",
    SchedulingConfig = new Gcp.Tpu.Inputs.NodeSchedulingConfigArgs
    {
        Preemptible = false,
    },
    UseServiceNetworking = false,
    Zone = "string",
});
example, err := tpu.NewNode(ctx, "nodeResource", &tpu.NodeArgs{
	AcceleratorType:   pulumi.String("string"),
	TensorflowVersion: pulumi.String("string"),
	CidrBlock:         pulumi.String("string"),
	Description:       pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name:    pulumi.String("string"),
	Network: pulumi.String("string"),
	Project: pulumi.String("string"),
	SchedulingConfig: &tpu.NodeSchedulingConfigArgs{
		Preemptible: pulumi.Bool(false),
	},
	UseServiceNetworking: pulumi.Bool(false),
	Zone:                 pulumi.String("string"),
})
var nodeResource = new Node("nodeResource", NodeArgs.builder()
    .acceleratorType("string")
    .tensorflowVersion("string")
    .cidrBlock("string")
    .description("string")
    .labels(Map.of("string", "string"))
    .name("string")
    .network("string")
    .project("string")
    .schedulingConfig(NodeSchedulingConfigArgs.builder()
        .preemptible(false)
        .build())
    .useServiceNetworking(false)
    .zone("string")
    .build());
node_resource = gcp.tpu.Node("nodeResource",
    accelerator_type="string",
    tensorflow_version="string",
    cidr_block="string",
    description="string",
    labels={
        "string": "string",
    },
    name="string",
    network="string",
    project="string",
    scheduling_config={
        "preemptible": False,
    },
    use_service_networking=False,
    zone="string")
const nodeResource = new gcp.tpu.Node("nodeResource", {
    acceleratorType: "string",
    tensorflowVersion: "string",
    cidrBlock: "string",
    description: "string",
    labels: {
        string: "string",
    },
    name: "string",
    network: "string",
    project: "string",
    schedulingConfig: {
        preemptible: false,
    },
    useServiceNetworking: false,
    zone: "string",
});
type: gcp:tpu:Node
properties:
    acceleratorType: string
    cidrBlock: string
    description: string
    labels:
        string: string
    name: string
    network: string
    project: string
    schedulingConfig:
        preemptible: false
    tensorflowVersion: string
    useServiceNetworking: false
    zone: string
Node Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Node resource accepts the following input properties:
- AcceleratorType string
- The type of hardware accelerators associated with this node.
- TensorflowVersion string
- The version of Tensorflow running in the Node.
- CidrBlock string
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- Description string
- The user-supplied description of the TPU. Maximum of 512 characters.
- Labels Dictionary<string, string>
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Name string
- The immutable name of the TPU.
- Network string
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- SchedulingConfig NodeScheduling Config 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- UseService boolNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- Zone string
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- AcceleratorType string
- The type of hardware accelerators associated with this node.
- TensorflowVersion string
- The version of Tensorflow running in the Node.
- CidrBlock string
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- Description string
- The user-supplied description of the TPU. Maximum of 512 characters.
- Labels map[string]string
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Name string
- The immutable name of the TPU.
- Network string
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- SchedulingConfig NodeScheduling Config Args 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- UseService boolNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- Zone string
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- acceleratorType String
- The type of hardware accelerators associated with this node.
- tensorflowVersion String
- The version of Tensorflow running in the Node.
- cidrBlock String
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description String
- The user-supplied description of the TPU. Maximum of 512 characters.
- labels Map<String,String>
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name String
- The immutable name of the TPU.
- network String
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- schedulingConfig NodeScheduling Config 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- useService BooleanNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone String
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- acceleratorType string
- The type of hardware accelerators associated with this node.
- tensorflowVersion string
- The version of Tensorflow running in the Node.
- cidrBlock string
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description string
- The user-supplied description of the TPU. Maximum of 512 characters.
- labels {[key: string]: string}
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name string
- The immutable name of the TPU.
- network string
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- schedulingConfig NodeScheduling Config 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- useService booleanNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone string
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- accelerator_type str
- The type of hardware accelerators associated with this node.
- tensorflow_version str
- The version of Tensorflow running in the Node.
- cidr_block str
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description str
- The user-supplied description of the TPU. Maximum of 512 characters.
- labels Mapping[str, str]
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name str
- The immutable name of the TPU.
- network str
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- scheduling_config NodeScheduling Config Args 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- use_service_ boolnetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone str
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- acceleratorType String
- The type of hardware accelerators associated with this node.
- tensorflowVersion String
- The version of Tensorflow running in the Node.
- cidrBlock String
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description String
- The user-supplied description of the TPU. Maximum of 512 characters.
- labels Map<String>
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name String
- The immutable name of the TPU.
- network String
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- schedulingConfig Property Map
- Sets the scheduling options for this TPU instance. Structure is documented below.
- useService BooleanNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone String
- The GCP location for the TPU. If it is not provided, the provider zone is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Node resource produces the following output properties:
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- NetworkEndpoints List<NodeNetwork Endpoint> 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- ServiceAccount string
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- NetworkEndpoints []NodeNetwork Endpoint 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- ServiceAccount string
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- networkEndpoints List<NodeNetwork Endpoint> 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- serviceAccount String
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- effectiveLabels {[key: string]: string}
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- networkEndpoints NodeNetwork Endpoint[] 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- serviceAccount string
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- effective_labels Mapping[str, str]
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- network_endpoints Sequence[NodeNetwork Endpoint] 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- service_account str
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- networkEndpoints List<Property Map>
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- serviceAccount String
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
Look up Existing Node Resource
Get an existing Node resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NodeState, opts?: CustomResourceOptions): Node@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accelerator_type: Optional[str] = None,
        cidr_block: Optional[str] = None,
        description: Optional[str] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        network: Optional[str] = None,
        network_endpoints: Optional[Sequence[NodeNetworkEndpointArgs]] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        scheduling_config: Optional[NodeSchedulingConfigArgs] = None,
        service_account: Optional[str] = None,
        tensorflow_version: Optional[str] = None,
        use_service_networking: Optional[bool] = None,
        zone: Optional[str] = None) -> Nodefunc GetNode(ctx *Context, name string, id IDInput, state *NodeState, opts ...ResourceOption) (*Node, error)public static Node Get(string name, Input<string> id, NodeState? state, CustomResourceOptions? opts = null)public static Node get(String name, Output<String> id, NodeState state, CustomResourceOptions options)resources:  _:    type: gcp:tpu:Node    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AcceleratorType string
- The type of hardware accelerators associated with this node.
- CidrBlock string
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- Description string
- The user-supplied description of the TPU. Maximum of 512 characters.
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels Dictionary<string, string>
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Name string
- The immutable name of the TPU.
- Network string
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- NetworkEndpoints List<NodeNetwork Endpoint> 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- SchedulingConfig NodeScheduling Config 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- ServiceAccount string
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- TensorflowVersion string
- The version of Tensorflow running in the Node.
- UseService boolNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- Zone string
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- AcceleratorType string
- The type of hardware accelerators associated with this node.
- CidrBlock string
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- Description string
- The user-supplied description of the TPU. Maximum of 512 characters.
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels map[string]string
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Name string
- The immutable name of the TPU.
- Network string
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- NetworkEndpoints []NodeNetwork Endpoint Args 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- SchedulingConfig NodeScheduling Config Args 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- ServiceAccount string
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- TensorflowVersion string
- The version of Tensorflow running in the Node.
- UseService boolNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- Zone string
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- acceleratorType String
- The type of hardware accelerators associated with this node.
- cidrBlock String
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description String
- The user-supplied description of the TPU. Maximum of 512 characters.
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String,String>
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name String
- The immutable name of the TPU.
- network String
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- networkEndpoints List<NodeNetwork Endpoint> 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- schedulingConfig NodeScheduling Config 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- serviceAccount String
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- tensorflowVersion String
- The version of Tensorflow running in the Node.
- useService BooleanNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone String
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- acceleratorType string
- The type of hardware accelerators associated with this node.
- cidrBlock string
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description string
- The user-supplied description of the TPU. Maximum of 512 characters.
- effectiveLabels {[key: string]: string}
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels {[key: string]: string}
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name string
- The immutable name of the TPU.
- network string
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- networkEndpoints NodeNetwork Endpoint[] 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- schedulingConfig NodeScheduling Config 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- serviceAccount string
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- tensorflowVersion string
- The version of Tensorflow running in the Node.
- useService booleanNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone string
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- accelerator_type str
- The type of hardware accelerators associated with this node.
- cidr_block str
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description str
- The user-supplied description of the TPU. Maximum of 512 characters.
- effective_labels Mapping[str, str]
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Mapping[str, str]
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name str
- The immutable name of the TPU.
- network str
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- network_endpoints Sequence[NodeNetwork Endpoint Args] 
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- scheduling_config NodeScheduling Config Args 
- Sets the scheduling options for this TPU instance. Structure is documented below.
- service_account str
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- tensorflow_version str
- The version of Tensorflow running in the Node.
- use_service_ boolnetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone str
- The GCP location for the TPU. If it is not provided, the provider zone is used.
- acceleratorType String
- The type of hardware accelerators associated with this node.
- cidrBlock String
- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
- description String
- The user-supplied description of the TPU. Maximum of 512 characters.
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String>
- Resource labels to represent user provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name String
- The immutable name of the TPU.
- network String
- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used.
- networkEndpoints List<Property Map>
- The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- schedulingConfig Property Map
- Sets the scheduling options for this TPU instance. Structure is documented below.
- serviceAccount String
- The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.
- tensorflowVersion String
- The version of Tensorflow running in the Node.
- useService BooleanNetworking 
- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled.
- zone String
- The GCP location for the TPU. If it is not provided, the provider zone is used.
Supporting Types
NodeNetworkEndpoint, NodeNetworkEndpointArgs      
- ip_address str
- (Output) The IP address of this network endpoint.
- port int
- (Output) The port of this network endpoint.
NodeSchedulingConfig, NodeSchedulingConfigArgs      
- Preemptible bool
- Defines whether the TPU instance is preemptible.
- Preemptible bool
- Defines whether the TPU instance is preemptible.
- preemptible Boolean
- Defines whether the TPU instance is preemptible.
- preemptible boolean
- Defines whether the TPU instance is preemptible.
- preemptible bool
- Defines whether the TPU instance is preemptible.
- preemptible Boolean
- Defines whether the TPU instance is preemptible.
Import
Node can be imported using any of these accepted formats:
- projects/{{project}}/locations/{{zone}}/nodes/{{name}}
- {{project}}/{{zone}}/{{name}}
- {{zone}}/{{name}}
- {{name}}
When using the pulumi import command, Node can be imported using one of the formats above. For example:
$ pulumi import gcp:tpu/node:Node default projects/{{project}}/locations/{{zone}}/nodes/{{name}}
$ pulumi import gcp:tpu/node:Node default {{project}}/{{zone}}/{{name}}
$ pulumi import gcp:tpu/node:Node default {{zone}}/{{name}}
$ pulumi import gcp:tpu/node:Node default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.