Class NodeTemplate
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:
- API documentation
- How-to Guides
- Sole-Tenant Nodes
Example Usage - Node Template Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var central1a = Output.Create(Gcp.Compute.GetNodeTypes.InvokeAsync(new Gcp.Compute.GetNodeTypesArgs
{
Zone = "us-central1-a",
}));
var template = new Gcp.Compute.NodeTemplate("template", new Gcp.Compute.NodeTemplateArgs
{
Region = "us-central1",
NodeType = central1a.Apply(central1a => central1a.Names[0]),
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class NodeTemplate : CustomResource
Constructors
View SourceNodeTemplate(String, NodeTemplateArgs, CustomResourceOptions)
Create a NodeTemplate resource with the given unique name, arguments, and options.
Declaration
public NodeTemplate(string name, NodeTemplateArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NodeTemplateArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCreationTimestamp
Creation timestamp in RFC3339 text format.
Declaration
public Output<string> CreationTimestamp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
An optional textual description of the resource.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Name of the resource.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NodeAffinityLabels
Labels to use for node affinity, which will be used in instance scheduling.
Declaration
public Output<ImmutableDictionary<string, string>> NodeAffinityLabels { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
NodeType
Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
Declaration
public Output<string> NodeType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NodeTypeFlexibility
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.
Declaration
public Output<NodeTemplateNodeTypeFlexibility> NodeTypeFlexibility { get; }
Property Value
| Type | Description |
|---|---|
| Output<NodeTemplateNodeTypeFlexibility> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
Region where nodes using the node template will be created. If it is not provided, the provider region is used.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SelfLink
The URI of the created resource.
Declaration
public Output<string> SelfLink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServerBinding
The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
Declaration
public Output<NodeTemplateServerBinding> ServerBinding { get; }
Property Value
| Type | Description |
|---|---|
| Output<NodeTemplateServerBinding> |
Methods
View SourceGet(String, Input<String>, NodeTemplateState, CustomResourceOptions)
Get an existing NodeTemplate resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static NodeTemplate Get(string name, Input<string> id, NodeTemplateState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NodeTemplateState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| NodeTemplate |