1. Packages
  2. Talos Linux
  3. API Docs
  4. client
  5. getConfiguration
talos v0.4.1 published on Tuesday, Nov 5, 2024 by Pulumiverse

talos.client.getConfiguration

Explore with Pulumi AI

talos logo
talos v0.4.1 published on Tuesday, Nov 5, 2024 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"],
    });
    
    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"])
    
    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
    	})
    }
    
    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",
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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>
    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]
    func GetConfiguration(ctx *Context, args *GetConfigurationArgs, opts ...InvokeOption) (*GetConfigurationResult, error)
    func GetConfigurationOutput(ctx *Context, args *GetConfigurationOutputArgs, opts ...InvokeOption) GetConfigurationResultOutput

    > 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)
    }
    public static CompletableFuture<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: talos:client/getConfiguration:getConfiguration
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClientConfiguration Pulumiverse.Talos.Client.Inputs.GetConfigurationClientConfiguration
    The client configuration data
    ClusterName 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 GetConfigurationClientConfiguration
    The client configuration data
    ClusterName 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 GetConfigurationClientConfiguration
    The client configuration data
    clusterName 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 GetConfigurationClientConfiguration
    The client configuration data
    clusterName 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 GetConfigurationClientConfiguration
    The client configuration data
    cluster_name 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 Property Map
    The client configuration data
    clusterName 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 string
    The client CA certificate
    ClientCertificate string
    The client certificate
    ClientKey string
    The client key
    CaCertificate string
    The client CA certificate
    ClientCertificate string
    The client certificate
    ClientKey string
    The client key
    caCertificate String
    The client CA certificate
    clientCertificate String
    The client certificate
    clientKey String
    The client key
    caCertificate string
    The client CA certificate
    clientCertificate string
    The client certificate
    clientKey string
    The client key
    ca_certificate str
    The client CA certificate
    client_certificate str
    The client certificate
    client_key str
    The client key
    caCertificate String
    The client CA certificate
    clientCertificate String
    The client certificate
    clientKey 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 logo
    talos v0.4.1 published on Tuesday, Nov 5, 2024 by Pulumiverse