1. Packages
  2. Rancher2 Provider
  3. API Docs
  4. getNodeTemplate
Rancher 2 v8.1.5 published on Wednesday, Apr 9, 2025 by Pulumi

rancher2.getNodeTemplate

Explore with Pulumi AI

Rancher 2 v8.1.5 published on Wednesday, Apr 9, 2025 by Pulumi

Use this data source to retrieve information about a Rancher v2 Node Template resource.

Example Usage

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

const foo = rancher2.getNodeTemplate({
    name: "foo",
});
Copy
import pulumi
import pulumi_rancher2 as rancher2

foo = rancher2.get_node_template(name="foo")
Copy
package main

import (
	"github.com/pulumi/pulumi-rancher2/sdk/v8/go/rancher2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rancher2.LookupNodeTemplate(ctx, &rancher2.LookupNodeTemplateArgs{
			Name: "foo",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;

return await Deployment.RunAsync(() => 
{
    var foo = Rancher2.GetNodeTemplate.Invoke(new()
    {
        Name = "foo",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.Rancher2Functions;
import com.pulumi.rancher2.inputs.GetNodeTemplateArgs;
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 foo = Rancher2Functions.getNodeTemplate(GetNodeTemplateArgs.builder()
            .name("foo")
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: rancher2:getNodeTemplate
      arguments:
        name: foo
Copy

Using getNodeTemplate

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNodeTemplate(args: GetNodeTemplateArgs, opts?: InvokeOptions): Promise<GetNodeTemplateResult>
function getNodeTemplateOutput(args: GetNodeTemplateOutputArgs, opts?: InvokeOptions): Output<GetNodeTemplateResult>
Copy
def get_node_template(name: Optional[str] = None,
                      use_internal_ip_address: Optional[bool] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNodeTemplateResult
def get_node_template_output(name: Optional[pulumi.Input[str]] = None,
                      use_internal_ip_address: Optional[pulumi.Input[bool]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNodeTemplateResult]
Copy
func LookupNodeTemplate(ctx *Context, args *LookupNodeTemplateArgs, opts ...InvokeOption) (*LookupNodeTemplateResult, error)
func LookupNodeTemplateOutput(ctx *Context, args *LookupNodeTemplateOutputArgs, opts ...InvokeOption) LookupNodeTemplateResultOutput
Copy

> Note: This function is named LookupNodeTemplate in the Go SDK.

public static class GetNodeTemplate 
{
    public static Task<GetNodeTemplateResult> InvokeAsync(GetNodeTemplateArgs args, InvokeOptions? opts = null)
    public static Output<GetNodeTemplateResult> Invoke(GetNodeTemplateInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNodeTemplateResult> getNodeTemplate(GetNodeTemplateArgs args, InvokeOptions options)
public static Output<GetNodeTemplateResult> getNodeTemplate(GetNodeTemplateArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: rancher2:index/getNodeTemplate:getNodeTemplate
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the Node Template (string)
UseInternalIpAddress bool
(Computed) Engine storage driver for the node template (bool)
Name This property is required. string
The name of the Node Template (string)
UseInternalIpAddress bool
(Computed) Engine storage driver for the node template (bool)
name This property is required. String
The name of the Node Template (string)
useInternalIpAddress Boolean
(Computed) Engine storage driver for the node template (bool)
name This property is required. string
The name of the Node Template (string)
useInternalIpAddress boolean
(Computed) Engine storage driver for the node template (bool)
name This property is required. str
The name of the Node Template (string)
use_internal_ip_address bool
(Computed) Engine storage driver for the node template (bool)
name This property is required. String
The name of the Node Template (string)
useInternalIpAddress Boolean
(Computed) Engine storage driver for the node template (bool)

getNodeTemplate Result

The following output properties are available:

Annotations Dictionary<string, string>
(Computed) Annotations for Node Template object (map)
CloudCredentialId string
(Computed) Cloud credential ID for the Node Template. Required from Rancher v2.2.x (string)
Description string
(Computed) Description for the Node Template (string)
Driver string
(Computed) The driver of the node template (string)
EngineEnv Dictionary<string, string>
(Computed) Engine environment for the node template (string)
EngineInsecureRegistries List<string>
(Computed) Insecure registry for the node template (list)
EngineInstallUrl string
(Computed) Docker engine install URL for the node template (string)
EngineLabel Dictionary<string, string>
(Computed) Engine label for the node template (string)
EngineOpt Dictionary<string, string>
(Computed) Engine options for the node template (map)
EngineRegistryMirrors List<string>
(Computed) Engine registry mirror for the node template (list)
EngineStorageDriver string
(Computed) Engine storage driver for the node template (string)
Id string
The provider-assigned unique ID for this managed resource.
Labels Dictionary<string, string>
(Computed) Labels for Node Template object (map)
Name string
NodeTaints List<GetNodeTemplateNodeTaint>
(Computed) Node taints (List)
UseInternalIpAddress bool
(Computed) Engine storage driver for the node template (bool)
Annotations map[string]string
(Computed) Annotations for Node Template object (map)
CloudCredentialId string
(Computed) Cloud credential ID for the Node Template. Required from Rancher v2.2.x (string)
Description string
(Computed) Description for the Node Template (string)
Driver string
(Computed) The driver of the node template (string)
EngineEnv map[string]string
(Computed) Engine environment for the node template (string)
EngineInsecureRegistries []string
(Computed) Insecure registry for the node template (list)
EngineInstallUrl string
(Computed) Docker engine install URL for the node template (string)
EngineLabel map[string]string
(Computed) Engine label for the node template (string)
EngineOpt map[string]string
(Computed) Engine options for the node template (map)
EngineRegistryMirrors []string
(Computed) Engine registry mirror for the node template (list)
EngineStorageDriver string
(Computed) Engine storage driver for the node template (string)
Id string
The provider-assigned unique ID for this managed resource.
Labels map[string]string
(Computed) Labels for Node Template object (map)
Name string
NodeTaints []GetNodeTemplateNodeTaint
(Computed) Node taints (List)
UseInternalIpAddress bool
(Computed) Engine storage driver for the node template (bool)
annotations Map<String,String>
(Computed) Annotations for Node Template object (map)
cloudCredentialId String
(Computed) Cloud credential ID for the Node Template. Required from Rancher v2.2.x (string)
description String
(Computed) Description for the Node Template (string)
driver String
(Computed) The driver of the node template (string)
engineEnv Map<String,String>
(Computed) Engine environment for the node template (string)
engineInsecureRegistries List<String>
(Computed) Insecure registry for the node template (list)
engineInstallUrl String
(Computed) Docker engine install URL for the node template (string)
engineLabel Map<String,String>
(Computed) Engine label for the node template (string)
engineOpt Map<String,String>
(Computed) Engine options for the node template (map)
engineRegistryMirrors List<String>
(Computed) Engine registry mirror for the node template (list)
engineStorageDriver String
(Computed) Engine storage driver for the node template (string)
id String
The provider-assigned unique ID for this managed resource.
labels Map<String,String>
(Computed) Labels for Node Template object (map)
name String
nodeTaints List<GetNodeTemplateNodeTaint>
(Computed) Node taints (List)
useInternalIpAddress Boolean
(Computed) Engine storage driver for the node template (bool)
annotations {[key: string]: string}
(Computed) Annotations for Node Template object (map)
cloudCredentialId string
(Computed) Cloud credential ID for the Node Template. Required from Rancher v2.2.x (string)
description string
(Computed) Description for the Node Template (string)
driver string
(Computed) The driver of the node template (string)
engineEnv {[key: string]: string}
(Computed) Engine environment for the node template (string)
engineInsecureRegistries string[]
(Computed) Insecure registry for the node template (list)
engineInstallUrl string
(Computed) Docker engine install URL for the node template (string)
engineLabel {[key: string]: string}
(Computed) Engine label for the node template (string)
engineOpt {[key: string]: string}
(Computed) Engine options for the node template (map)
engineRegistryMirrors string[]
(Computed) Engine registry mirror for the node template (list)
engineStorageDriver string
(Computed) Engine storage driver for the node template (string)
id string
The provider-assigned unique ID for this managed resource.
labels {[key: string]: string}
(Computed) Labels for Node Template object (map)
name string
nodeTaints GetNodeTemplateNodeTaint[]
(Computed) Node taints (List)
useInternalIpAddress boolean
(Computed) Engine storage driver for the node template (bool)
annotations Mapping[str, str]
(Computed) Annotations for Node Template object (map)
cloud_credential_id str
(Computed) Cloud credential ID for the Node Template. Required from Rancher v2.2.x (string)
description str
(Computed) Description for the Node Template (string)
driver str
(Computed) The driver of the node template (string)
engine_env Mapping[str, str]
(Computed) Engine environment for the node template (string)
engine_insecure_registries Sequence[str]
(Computed) Insecure registry for the node template (list)
engine_install_url str
(Computed) Docker engine install URL for the node template (string)
engine_label Mapping[str, str]
(Computed) Engine label for the node template (string)
engine_opt Mapping[str, str]
(Computed) Engine options for the node template (map)
engine_registry_mirrors Sequence[str]
(Computed) Engine registry mirror for the node template (list)
engine_storage_driver str
(Computed) Engine storage driver for the node template (string)
id str
The provider-assigned unique ID for this managed resource.
labels Mapping[str, str]
(Computed) Labels for Node Template object (map)
name str
node_taints Sequence[GetNodeTemplateNodeTaint]
(Computed) Node taints (List)
use_internal_ip_address bool
(Computed) Engine storage driver for the node template (bool)
annotations Map<String>
(Computed) Annotations for Node Template object (map)
cloudCredentialId String
(Computed) Cloud credential ID for the Node Template. Required from Rancher v2.2.x (string)
description String
(Computed) Description for the Node Template (string)
driver String
(Computed) The driver of the node template (string)
engineEnv Map<String>
(Computed) Engine environment for the node template (string)
engineInsecureRegistries List<String>
(Computed) Insecure registry for the node template (list)
engineInstallUrl String
(Computed) Docker engine install URL for the node template (string)
engineLabel Map<String>
(Computed) Engine label for the node template (string)
engineOpt Map<String>
(Computed) Engine options for the node template (map)
engineRegistryMirrors List<String>
(Computed) Engine registry mirror for the node template (list)
engineStorageDriver String
(Computed) Engine storage driver for the node template (string)
id String
The provider-assigned unique ID for this managed resource.
labels Map<String>
(Computed) Labels for Node Template object (map)
name String
nodeTaints List<Property Map>
(Computed) Node taints (List)
useInternalIpAddress Boolean
(Computed) Engine storage driver for the node template (bool)

Supporting Types

GetNodeTemplateNodeTaint

Key This property is required. string
TimeAdded This property is required. string
Value This property is required. string
Effect string
Key This property is required. string
TimeAdded This property is required. string
Value This property is required. string
Effect string
key This property is required. String
timeAdded This property is required. String
value This property is required. String
effect String
key This property is required. string
timeAdded This property is required. string
value This property is required. string
effect string
key This property is required. str
time_added This property is required. str
value This property is required. str
effect str
key This property is required. String
timeAdded This property is required. String
value This property is required. String
effect String

Package Details

Repository
Rancher2 pulumi/pulumi-rancher2
License
Apache-2.0
Notes
This Pulumi package is based on the rancher2 Terraform Provider.
Rancher 2 v8.1.5 published on Wednesday, Apr 9, 2025 by Pulumi