1. Packages
  2. Talos Linux
  3. API Docs
  4. client
  5. getConfiguration
talos v0.5.2 published on Thursday, Jan 23, 2025 by Pulumiverse

talos.client.getConfiguration

Explore with Pulumi AI

talos v0.5.2 published on Thursday, Jan 23, 2025 by Pulumiverse

Generate client configuration for a Talos cluster

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as talos from "@pulumi/talos";
import * as talos from "@pulumiverse/talos";

const thisSecrets = new talos.machine.Secrets("this", {});
const this = talos.client.getConfigurationOutput({
    clusterName: "example-cluster",
    clientConfiguration: thisSecrets.clientConfiguration,
    nodes: ["10.5.0.2"],
});
Copy
import pulumi
import pulumi_talos as talos
import pulumiverse_talos as talos

this_secrets = talos.machine.Secrets("this")
this = talos.client.get_configuration_output(cluster_name="example-cluster",
    client_configuration=this_secrets.client_configuration,
    nodes=["10.5.0.2"])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-talos/sdk/go/talos/client"
	"github.com/pulumiverse/pulumi-talos/sdk/go/talos/machine"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		thisSecrets, err := machine.NewSecrets(ctx, "this", nil)
		if err != nil {
			return err
		}
		_ = client.GetConfigurationOutput(ctx, client.GetConfigurationOutputArgs{
			ClusterName:         pulumi.String("example-cluster"),
			ClientConfiguration: thisSecrets.ClientConfiguration,
			Nodes: pulumi.StringArray{
				pulumi.String("10.5.0.2"),
			},
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Talos = Pulumi.Talos;
using Talos = Pulumiverse.Talos;

return await Deployment.RunAsync(() => 
{
    var thisSecrets = new Talos.Machine.Secrets("this");

    var @this = Talos.Client.GetConfiguration.Invoke(new()
    {
        ClusterName = "example-cluster",
        ClientConfiguration = thisSecrets.ClientConfiguration,
        Nodes = new[]
        {
            "10.5.0.2",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.talos.machine.Secrets;
import com.pulumi.talos.client.ClientFunctions;
import com.pulumi.talos.client.inputs.GetConfigurationArgs;
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 thisSecrets = new Secrets("thisSecrets");

        final var this = ClientFunctions.getConfiguration(GetConfigurationArgs.builder()
            .clusterName("example-cluster")
            .clientConfiguration(thisSecrets.clientConfiguration())
            .nodes("10.5.0.2")
            .build());

    }
}
Copy
resources:
  thisSecrets:
    type: talos:machine:Secrets
    name: this
variables:
  this:
    fn::invoke:
      function: talos:client:getConfiguration
      arguments:
        clusterName: example-cluster
        clientConfiguration: ${thisSecrets.clientConfiguration}
        nodes:
          - 10.5.0.2
Copy

Using getConfiguration

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 getConfiguration(args: GetConfigurationArgs, opts?: InvokeOptions): Promise<GetConfigurationResult>
function getConfigurationOutput(args: GetConfigurationOutputArgs, opts?: InvokeOptions): Output<GetConfigurationResult>
Copy
def get_configuration(client_configuration: Optional[GetConfigurationClientConfiguration] = None,
                      cluster_name: Optional[str] = None,
                      endpoints: Optional[Sequence[str]] = None,
                      nodes: Optional[Sequence[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetConfigurationResult
def get_configuration_output(client_configuration: Optional[pulumi.Input[GetConfigurationClientConfigurationArgs]] = None,
                      cluster_name: Optional[pulumi.Input[str]] = None,
                      endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      nodes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetConfigurationResult]
Copy
func GetConfiguration(ctx *Context, args *GetConfigurationArgs, opts ...InvokeOption) (*GetConfigurationResult, error)
func GetConfigurationOutput(ctx *Context, args *GetConfigurationOutputArgs, opts ...InvokeOption) GetConfigurationResultOutput
Copy

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

public static class GetConfiguration 
{
    public static Task<GetConfigurationResult> InvokeAsync(GetConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetConfigurationResult> Invoke(GetConfigurationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
public static Output<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: talos:client/getConfiguration:getConfiguration
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClientConfiguration This property is required. Pulumiverse.Talos.Client.Inputs.GetConfigurationClientConfiguration
The client configuration data
ClusterName This property is required. string
The name of the cluster in the generated config
Endpoints List<string>
endpoints to set in the generated config
Nodes List<string>
nodes to set in the generated config
ClientConfiguration This property is required. GetConfigurationClientConfiguration
The client configuration data
ClusterName This property is required. string
The name of the cluster in the generated config
Endpoints []string
endpoints to set in the generated config
Nodes []string
nodes to set in the generated config
clientConfiguration This property is required. GetConfigurationClientConfiguration
The client configuration data
clusterName This property is required. String
The name of the cluster in the generated config
endpoints List<String>
endpoints to set in the generated config
nodes List<String>
nodes to set in the generated config
clientConfiguration This property is required. GetConfigurationClientConfiguration
The client configuration data
clusterName This property is required. string
The name of the cluster in the generated config
endpoints string[]
endpoints to set in the generated config
nodes string[]
nodes to set in the generated config
client_configuration This property is required. GetConfigurationClientConfiguration
The client configuration data
cluster_name This property is required. str
The name of the cluster in the generated config
endpoints Sequence[str]
endpoints to set in the generated config
nodes Sequence[str]
nodes to set in the generated config
clientConfiguration This property is required. Property Map
The client configuration data
clusterName This property is required. String
The name of the cluster in the generated config
endpoints List<String>
endpoints to set in the generated config
nodes List<String>
nodes to set in the generated config

getConfiguration Result

The following output properties are available:

ClientConfiguration Pulumiverse.Talos.Client.Outputs.GetConfigurationClientConfiguration
The client configuration data
ClusterName string
The name of the cluster in the generated config
Id string
The ID of this resource
TalosConfig string
The generated client configuration
Endpoints List<string>
endpoints to set in the generated config
Nodes List<string>
nodes to set in the generated config
ClientConfiguration GetConfigurationClientConfiguration
The client configuration data
ClusterName string
The name of the cluster in the generated config
Id string
The ID of this resource
TalosConfig string
The generated client configuration
Endpoints []string
endpoints to set in the generated config
Nodes []string
nodes to set in the generated config
clientConfiguration GetConfigurationClientConfiguration
The client configuration data
clusterName String
The name of the cluster in the generated config
id String
The ID of this resource
talosConfig String
The generated client configuration
endpoints List<String>
endpoints to set in the generated config
nodes List<String>
nodes to set in the generated config
clientConfiguration GetConfigurationClientConfiguration
The client configuration data
clusterName string
The name of the cluster in the generated config
id string
The ID of this resource
talosConfig string
The generated client configuration
endpoints string[]
endpoints to set in the generated config
nodes string[]
nodes to set in the generated config
client_configuration GetConfigurationClientConfiguration
The client configuration data
cluster_name str
The name of the cluster in the generated config
id str
The ID of this resource
talos_config str
The generated client configuration
endpoints Sequence[str]
endpoints to set in the generated config
nodes Sequence[str]
nodes to set in the generated config
clientConfiguration Property Map
The client configuration data
clusterName String
The name of the cluster in the generated config
id String
The ID of this resource
talosConfig String
The generated client configuration
endpoints List<String>
endpoints to set in the generated config
nodes List<String>
nodes to set in the generated config

Supporting Types

GetConfigurationClientConfiguration

CaCertificate This property is required. string
The client CA certificate
ClientCertificate This property is required. string
The client certificate
ClientKey This property is required. string
The client key
CaCertificate This property is required. string
The client CA certificate
ClientCertificate This property is required. string
The client certificate
ClientKey This property is required. string
The client key
caCertificate This property is required. String
The client CA certificate
clientCertificate This property is required. String
The client certificate
clientKey This property is required. String
The client key
caCertificate This property is required. string
The client CA certificate
clientCertificate This property is required. string
The client certificate
clientKey This property is required. string
The client key
ca_certificate This property is required. str
The client CA certificate
client_certificate This property is required. str
The client certificate
client_key This property is required. str
The client key
caCertificate This property is required. String
The client CA certificate
clientCertificate This property is required. String
The client certificate
clientKey This property is required. String
The client key

Package Details

Repository
talos pulumiverse/pulumi-talos
License
MPL-2.0
Notes
This Pulumi package is based on the talos Terraform Provider.
talos v0.5.2 published on Thursday, Jan 23, 2025 by Pulumiverse