1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. NodeTemplate
Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi

gcp.compute.NodeTemplate

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi

    Represents a NodeTemplate resource. Node templates specify properties for creating sole-tenant nodes, such as node type, vCPU and memory requirements, node affinity labels, and region.

    To get more information about NodeTemplate, see:

    Example Usage

    Node Template Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const template = new gcp.compute.NodeTemplate("template", {
        name: "soletenant-tmpl",
        region: "us-central1",
        nodeType: "n1-node-96-624",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    template = gcp.compute.NodeTemplate("template",
        name="soletenant-tmpl",
        region="us-central1",
        node_type="n1-node-96-624")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewNodeTemplate(ctx, "template", &compute.NodeTemplateArgs{
    			Name:     pulumi.String("soletenant-tmpl"),
    			Region:   pulumi.String("us-central1"),
    			NodeType: pulumi.String("n1-node-96-624"),
    		})
    		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 template = new Gcp.Compute.NodeTemplate("template", new()
        {
            Name = "soletenant-tmpl",
            Region = "us-central1",
            NodeType = "n1-node-96-624",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.NodeTemplate;
    import com.pulumi.gcp.compute.NodeTemplateArgs;
    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) {
            var template = new NodeTemplate("template", NodeTemplateArgs.builder()
                .name("soletenant-tmpl")
                .region("us-central1")
                .nodeType("n1-node-96-624")
                .build());
    
        }
    }
    
    resources:
      template:
        type: gcp:compute:NodeTemplate
        properties:
          name: soletenant-tmpl
          region: us-central1
          nodeType: n1-node-96-624
    

    Node Template Server Binding

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const central1a = gcp.compute.getNodeTypes({
        zone: "us-central1-a",
    });
    const template = new gcp.compute.NodeTemplate("template", {
        name: "soletenant-with-licenses",
        region: "us-central1",
        nodeType: "n1-node-96-624",
        nodeAffinityLabels: {
            foo: "baz",
        },
        serverBinding: {
            type: "RESTART_NODE_ON_MINIMAL_SERVERS",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    central1a = gcp.compute.get_node_types(zone="us-central1-a")
    template = gcp.compute.NodeTemplate("template",
        name="soletenant-with-licenses",
        region="us-central1",
        node_type="n1-node-96-624",
        node_affinity_labels={
            "foo": "baz",
        },
        server_binding=gcp.compute.NodeTemplateServerBindingArgs(
            type="RESTART_NODE_ON_MINIMAL_SERVERS",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.GetNodeTypes(ctx, &compute.GetNodeTypesArgs{
    			Zone: pulumi.StringRef("us-central1-a"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNodeTemplate(ctx, "template", &compute.NodeTemplateArgs{
    			Name:     pulumi.String("soletenant-with-licenses"),
    			Region:   pulumi.String("us-central1"),
    			NodeType: pulumi.String("n1-node-96-624"),
    			NodeAffinityLabels: pulumi.StringMap{
    				"foo": pulumi.String("baz"),
    			},
    			ServerBinding: &compute.NodeTemplateServerBindingArgs{
    				Type: pulumi.String("RESTART_NODE_ON_MINIMAL_SERVERS"),
    			},
    		})
    		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 central1a = Gcp.Compute.GetNodeTypes.Invoke(new()
        {
            Zone = "us-central1-a",
        });
    
        var template = new Gcp.Compute.NodeTemplate("template", new()
        {
            Name = "soletenant-with-licenses",
            Region = "us-central1",
            NodeType = "n1-node-96-624",
            NodeAffinityLabels = 
            {
                { "foo", "baz" },
            },
            ServerBinding = new Gcp.Compute.Inputs.NodeTemplateServerBindingArgs
            {
                Type = "RESTART_NODE_ON_MINIMAL_SERVERS",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetNodeTypesArgs;
    import com.pulumi.gcp.compute.NodeTemplate;
    import com.pulumi.gcp.compute.NodeTemplateArgs;
    import com.pulumi.gcp.compute.inputs.NodeTemplateServerBindingArgs;
    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 central1a = ComputeFunctions.getNodeTypes(GetNodeTypesArgs.builder()
                .zone("us-central1-a")
                .build());
    
            var template = new NodeTemplate("template", NodeTemplateArgs.builder()
                .name("soletenant-with-licenses")
                .region("us-central1")
                .nodeType("n1-node-96-624")
                .nodeAffinityLabels(Map.of("foo", "baz"))
                .serverBinding(NodeTemplateServerBindingArgs.builder()
                    .type("RESTART_NODE_ON_MINIMAL_SERVERS")
                    .build())
                .build());
    
        }
    }
    
    resources:
      template:
        type: gcp:compute:NodeTemplate
        properties:
          name: soletenant-with-licenses
          region: us-central1
          nodeType: n1-node-96-624
          nodeAffinityLabels:
            foo: baz
          serverBinding:
            type: RESTART_NODE_ON_MINIMAL_SERVERS
    variables:
      central1a:
        fn::invoke:
          Function: gcp:compute:getNodeTypes
          Arguments:
            zone: us-central1-a
    

    Create NodeTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NodeTemplate(name: string, args?: NodeTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def NodeTemplate(resource_name: str,
                     args: Optional[NodeTemplateArgs] = None,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def NodeTemplate(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     cpu_overcommit_type: Optional[str] = None,
                     description: Optional[str] = None,
                     name: Optional[str] = None,
                     node_affinity_labels: Optional[Mapping[str, str]] = None,
                     node_type: Optional[str] = None,
                     node_type_flexibility: Optional[NodeTemplateNodeTypeFlexibilityArgs] = None,
                     project: Optional[str] = None,
                     region: Optional[str] = None,
                     server_binding: Optional[NodeTemplateServerBindingArgs] = None)
    func NewNodeTemplate(ctx *Context, name string, args *NodeTemplateArgs, opts ...ResourceOption) (*NodeTemplate, error)
    public NodeTemplate(string name, NodeTemplateArgs? args = null, CustomResourceOptions? opts = null)
    public NodeTemplate(String name, NodeTemplateArgs args)
    public NodeTemplate(String name, NodeTemplateArgs args, CustomResourceOptions options)
    
    type: gcp:compute:NodeTemplate
    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 NodeTemplateArgs
    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 NodeTemplateArgs
    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 NodeTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NodeTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NodeTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var nodeTemplateResource = new Gcp.Compute.NodeTemplate("nodeTemplateResource", new()
    {
        CpuOvercommitType = "string",
        Description = "string",
        Name = "string",
        NodeAffinityLabels = 
        {
            { "string", "string" },
        },
        NodeType = "string",
        NodeTypeFlexibility = new Gcp.Compute.Inputs.NodeTemplateNodeTypeFlexibilityArgs
        {
            Cpus = "string",
            LocalSsd = "string",
            Memory = "string",
        },
        Project = "string",
        Region = "string",
        ServerBinding = new Gcp.Compute.Inputs.NodeTemplateServerBindingArgs
        {
            Type = "string",
        },
    });
    
    example, err := compute.NewNodeTemplate(ctx, "nodeTemplateResource", &compute.NodeTemplateArgs{
    	CpuOvercommitType: pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	NodeAffinityLabels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	NodeType: pulumi.String("string"),
    	NodeTypeFlexibility: &compute.NodeTemplateNodeTypeFlexibilityArgs{
    		Cpus:     pulumi.String("string"),
    		LocalSsd: pulumi.String("string"),
    		Memory:   pulumi.String("string"),
    	},
    	Project: pulumi.String("string"),
    	Region:  pulumi.String("string"),
    	ServerBinding: &compute.NodeTemplateServerBindingArgs{
    		Type: pulumi.String("string"),
    	},
    })
    
    var nodeTemplateResource = new NodeTemplate("nodeTemplateResource", NodeTemplateArgs.builder()
        .cpuOvercommitType("string")
        .description("string")
        .name("string")
        .nodeAffinityLabels(Map.of("string", "string"))
        .nodeType("string")
        .nodeTypeFlexibility(NodeTemplateNodeTypeFlexibilityArgs.builder()
            .cpus("string")
            .localSsd("string")
            .memory("string")
            .build())
        .project("string")
        .region("string")
        .serverBinding(NodeTemplateServerBindingArgs.builder()
            .type("string")
            .build())
        .build());
    
    node_template_resource = gcp.compute.NodeTemplate("nodeTemplateResource",
        cpu_overcommit_type="string",
        description="string",
        name="string",
        node_affinity_labels={
            "string": "string",
        },
        node_type="string",
        node_type_flexibility=gcp.compute.NodeTemplateNodeTypeFlexibilityArgs(
            cpus="string",
            local_ssd="string",
            memory="string",
        ),
        project="string",
        region="string",
        server_binding=gcp.compute.NodeTemplateServerBindingArgs(
            type="string",
        ))
    
    const nodeTemplateResource = new gcp.compute.NodeTemplate("nodeTemplateResource", {
        cpuOvercommitType: "string",
        description: "string",
        name: "string",
        nodeAffinityLabels: {
            string: "string",
        },
        nodeType: "string",
        nodeTypeFlexibility: {
            cpus: "string",
            localSsd: "string",
            memory: "string",
        },
        project: "string",
        region: "string",
        serverBinding: {
            type: "string",
        },
    });
    
    type: gcp:compute:NodeTemplate
    properties:
        cpuOvercommitType: string
        description: string
        name: string
        nodeAffinityLabels:
            string: string
        nodeType: string
        nodeTypeFlexibility:
            cpus: string
            localSsd: string
            memory: string
        project: string
        region: string
        serverBinding:
            type: string
    

    NodeTemplate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NodeTemplate resource accepts the following input properties:

    CpuOvercommitType string
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    Description string
    An optional textual description of the resource.
    Name string
    Name of the resource.
    NodeAffinityLabels Dictionary<string, string>
    Labels to use for node affinity, which will be used in instance scheduling.
    NodeType string
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    NodeTypeFlexibility NodeTemplateNodeTypeFlexibility
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    Region string
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    ServerBinding NodeTemplateServerBinding
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    CpuOvercommitType string
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    Description string
    An optional textual description of the resource.
    Name string
    Name of the resource.
    NodeAffinityLabels map[string]string
    Labels to use for node affinity, which will be used in instance scheduling.
    NodeType string
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    NodeTypeFlexibility NodeTemplateNodeTypeFlexibilityArgs
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    Region string
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    ServerBinding NodeTemplateServerBindingArgs
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpuOvercommitType String
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    description String
    An optional textual description of the resource.
    name String
    Name of the resource.
    nodeAffinityLabels Map<String,String>
    Labels to use for node affinity, which will be used in instance scheduling.
    nodeType String
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    nodeTypeFlexibility NodeTemplateNodeTypeFlexibility
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region String
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    serverBinding NodeTemplateServerBinding
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpuOvercommitType string
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    description string
    An optional textual description of the resource.
    name string
    Name of the resource.
    nodeAffinityLabels {[key: string]: string}
    Labels to use for node affinity, which will be used in instance scheduling.
    nodeType string
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    nodeTypeFlexibility NodeTemplateNodeTypeFlexibility
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region string
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    serverBinding NodeTemplateServerBinding
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpu_overcommit_type str
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    description str
    An optional textual description of the resource.
    name str
    Name of the resource.
    node_affinity_labels Mapping[str, str]
    Labels to use for node affinity, which will be used in instance scheduling.
    node_type str
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    node_type_flexibility NodeTemplateNodeTypeFlexibilityArgs
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region str
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    server_binding NodeTemplateServerBindingArgs
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpuOvercommitType String
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    description String
    An optional textual description of the resource.
    name String
    Name of the resource.
    nodeAffinityLabels Map<String>
    Labels to use for node affinity, which will be used in instance scheduling.
    nodeType String
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    nodeTypeFlexibility Property Map
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region String
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    serverBinding Property Map
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NodeTemplate resource produces the following output properties:

    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    The URI of the created resource.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    id str
    The provider-assigned unique ID for this managed resource.
    self_link str
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.

    Look up Existing NodeTemplate Resource

    Get an existing NodeTemplate 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?: NodeTemplateState, opts?: CustomResourceOptions): NodeTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cpu_overcommit_type: Optional[str] = None,
            creation_timestamp: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            node_affinity_labels: Optional[Mapping[str, str]] = None,
            node_type: Optional[str] = None,
            node_type_flexibility: Optional[NodeTemplateNodeTypeFlexibilityArgs] = None,
            project: Optional[str] = None,
            region: Optional[str] = None,
            self_link: Optional[str] = None,
            server_binding: Optional[NodeTemplateServerBindingArgs] = None) -> NodeTemplate
    func GetNodeTemplate(ctx *Context, name string, id IDInput, state *NodeTemplateState, opts ...ResourceOption) (*NodeTemplate, error)
    public static NodeTemplate Get(string name, Input<string> id, NodeTemplateState? state, CustomResourceOptions? opts = null)
    public static NodeTemplate get(String name, Output<String> id, NodeTemplateState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    CpuOvercommitType string
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional textual description of the resource.
    Name string
    Name of the resource.
    NodeAffinityLabels Dictionary<string, string>
    Labels to use for node affinity, which will be used in instance scheduling.
    NodeType string
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    NodeTypeFlexibility NodeTemplateNodeTypeFlexibility
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    Region string
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    SelfLink string
    The URI of the created resource.
    ServerBinding NodeTemplateServerBinding
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    CpuOvercommitType string
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional textual description of the resource.
    Name string
    Name of the resource.
    NodeAffinityLabels map[string]string
    Labels to use for node affinity, which will be used in instance scheduling.
    NodeType string
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    NodeTypeFlexibility NodeTemplateNodeTypeFlexibilityArgs
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    Region string
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    SelfLink string
    The URI of the created resource.
    ServerBinding NodeTemplateServerBindingArgs
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpuOvercommitType String
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional textual description of the resource.
    name String
    Name of the resource.
    nodeAffinityLabels Map<String,String>
    Labels to use for node affinity, which will be used in instance scheduling.
    nodeType String
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    nodeTypeFlexibility NodeTemplateNodeTypeFlexibility
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region String
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    selfLink String
    The URI of the created resource.
    serverBinding NodeTemplateServerBinding
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpuOvercommitType string
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    description string
    An optional textual description of the resource.
    name string
    Name of the resource.
    nodeAffinityLabels {[key: string]: string}
    Labels to use for node affinity, which will be used in instance scheduling.
    nodeType string
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    nodeTypeFlexibility NodeTemplateNodeTypeFlexibility
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region string
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    selfLink string
    The URI of the created resource.
    serverBinding NodeTemplateServerBinding
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpu_overcommit_type str
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    description str
    An optional textual description of the resource.
    name str
    Name of the resource.
    node_affinity_labels Mapping[str, str]
    Labels to use for node affinity, which will be used in instance scheduling.
    node_type str
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    node_type_flexibility NodeTemplateNodeTypeFlexibilityArgs
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region str
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    self_link str
    The URI of the created resource.
    server_binding NodeTemplateServerBindingArgs
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
    cpuOvercommitType String
    CPU overcommit. Default value is NONE. Possible values are: ENABLED, NONE.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional textual description of the resource.
    name String
    Name of the resource.
    nodeAffinityLabels Map<String>
    Labels to use for node affinity, which will be used in instance scheduling.
    nodeType String
    Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
    nodeTypeFlexibility Property Map
    Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. 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.
    region String
    Region where nodes using the node template will be created. If it is not provided, the provider region is used.
    selfLink String
    The URI of the created resource.
    serverBinding Property Map
    The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.

    Supporting Types

    NodeTemplateNodeTypeFlexibility, NodeTemplateNodeTypeFlexibilityArgs

    Cpus string
    Number of virtual CPUs to use.
    LocalSsd string
    (Output) Use local SSD
    Memory string
    Physical memory available to the node, defined in MB.
    Cpus string
    Number of virtual CPUs to use.
    LocalSsd string
    (Output) Use local SSD
    Memory string
    Physical memory available to the node, defined in MB.
    cpus String
    Number of virtual CPUs to use.
    localSsd String
    (Output) Use local SSD
    memory String
    Physical memory available to the node, defined in MB.
    cpus string
    Number of virtual CPUs to use.
    localSsd string
    (Output) Use local SSD
    memory string
    Physical memory available to the node, defined in MB.
    cpus str
    Number of virtual CPUs to use.
    local_ssd str
    (Output) Use local SSD
    memory str
    Physical memory available to the node, defined in MB.
    cpus String
    Number of virtual CPUs to use.
    localSsd String
    (Output) Use local SSD
    memory String
    Physical memory available to the node, defined in MB.

    NodeTemplateServerBinding, NodeTemplateServerBindingArgs

    Type string
    Type of server binding policy. If RESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. If RESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values are: RESTART_NODE_ON_ANY_SERVER, RESTART_NODE_ON_MINIMAL_SERVERS.
    Type string
    Type of server binding policy. If RESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. If RESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values are: RESTART_NODE_ON_ANY_SERVER, RESTART_NODE_ON_MINIMAL_SERVERS.
    type String
    Type of server binding policy. If RESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. If RESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values are: RESTART_NODE_ON_ANY_SERVER, RESTART_NODE_ON_MINIMAL_SERVERS.
    type string
    Type of server binding policy. If RESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. If RESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values are: RESTART_NODE_ON_ANY_SERVER, RESTART_NODE_ON_MINIMAL_SERVERS.
    type str
    Type of server binding policy. If RESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. If RESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values are: RESTART_NODE_ON_ANY_SERVER, RESTART_NODE_ON_MINIMAL_SERVERS.
    type String
    Type of server binding policy. If RESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. If RESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values are: RESTART_NODE_ON_ANY_SERVER, RESTART_NODE_ON_MINIMAL_SERVERS.

    Import

    NodeTemplate can be imported using any of these accepted formats:

    • projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}

    • {{project}}/{{region}}/{{name}}

    • {{region}}/{{name}}

    • {{name}}

    When using the pulumi import command, NodeTemplate can be imported using one of the formats above. For example:

    $ pulumi import gcp:compute/nodeTemplate:NodeTemplate default projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}
    
    $ pulumi import gcp:compute/nodeTemplate:NodeTemplate default {{project}}/{{region}}/{{name}}
    
    $ pulumi import gcp:compute/nodeTemplate:NodeTemplate default {{region}}/{{name}}
    
    $ pulumi import gcp:compute/nodeTemplate:NodeTemplate 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-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi