1. Packages
  2. Talos Linux
  3. API Docs
  4. machine
  5. getConfiguration
talos v0.2.0 published on Thursday, Dec 21, 2023 by Pulumiverse

talos.machine.getConfiguration

Explore with Pulumi AI

talos logo
talos v0.2.0 published on Thursday, Dec 21, 2023 by Pulumiverse

    Generate a machine configuration for a node type

    Note: It is recommended to set the optional talos_version attribute. Otherwise when using a new version of the provider with a new major version of the Talos SDK, new machineconfig features will be enabled by default which could cause unexpected behavior.

    Example Usage

    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("thisSecrets");
    
        var thisConfiguration = Talos.Machine.GetConfiguration.Invoke(new()
        {
            ClusterName = "example-cluster",
            MachineType = "controlplane",
            ClusterEndpoint = "https://cluster.local:6443",
            MachineSecrets = thisSecrets.MachineSecrets,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-talos/sdk/go/talos/machine"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		thisSecrets, err := machine.NewSecrets(ctx, "thisSecrets", nil)
    		if err != nil {
    			return err
    		}
    		_ = machine.GetConfigurationOutput(ctx, machine.GetConfigurationOutputArgs{
    			ClusterName:     pulumi.String("example-cluster"),
    			MachineType:     pulumi.String("controlplane"),
    			ClusterEndpoint: pulumi.String("https://cluster.local:6443"),
    			MachineSecrets:  thisSecrets.MachineSecrets,
    		}, nil)
    		return nil
    	})
    }
    
    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.machine.MachineFunctions;
    import com.pulumi.talos.machine.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 thisConfiguration = MachineFunctions.getConfiguration(GetConfigurationArgs.builder()
                .clusterName("example-cluster")
                .machineType("controlplane")
                .clusterEndpoint("https://cluster.local:6443")
                .machineSecrets(thisSecrets.machineSecrets())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_talos as talos
    import pulumiverse_talos as talos
    
    this_secrets = talos.machine.Secrets("thisSecrets")
    this_configuration = talos.machine.get_configuration_output(cluster_name="example-cluster",
        machine_type="controlplane",
        cluster_endpoint="https://cluster.local:6443",
        machine_secrets=this_secrets.machine_secrets)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as talos from "@pulumi/talos";
    import * as talos from "@pulumiverse/talos";
    
    const thisSecrets = new talos.machine.Secrets("thisSecrets", {});
    const thisConfiguration = talos.machine.getConfigurationOutput({
        clusterName: "example-cluster",
        machineType: "controlplane",
        clusterEndpoint: "https://cluster.local:6443",
        machineSecrets: thisSecrets.machineSecrets,
    });
    
    resources:
      thisSecrets:
        type: talos:machine:Secrets
    variables:
      thisConfiguration:
        fn::invoke:
          Function: talos:machine:getConfiguration
          Arguments:
            clusterName: example-cluster
            machineType: controlplane
            clusterEndpoint: https://cluster.local:6443
            machineSecrets: ${thisSecrets.machineSecrets}
    

    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(cluster_endpoint: Optional[str] = None,
                          cluster_name: Optional[str] = None,
                          config_patches: Optional[Sequence[str]] = None,
                          docs: Optional[bool] = None,
                          examples: Optional[bool] = None,
                          kubernetes_version: Optional[str] = None,
                          machine_secrets: Optional[MachineSecrets] = None,
                          machine_type: Optional[str] = None,
                          talos_version: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetConfigurationResult
    def get_configuration_output(cluster_endpoint: Optional[pulumi.Input[str]] = None,
                          cluster_name: Optional[pulumi.Input[str]] = None,
                          config_patches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          docs: Optional[pulumi.Input[bool]] = None,
                          examples: Optional[pulumi.Input[bool]] = None,
                          kubernetes_version: Optional[pulumi.Input[str]] = None,
                          machine_secrets: Optional[pulumi.Input[MachineSecretsArgs]] = None,
                          machine_type: Optional[pulumi.Input[str]] = None,
                          talos_version: Optional[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:machine/getConfiguration:getConfiguration
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterEndpoint string
    The endpoint of the talos kubernetes cluster
    ClusterName string
    The name of the talos kubernetes cluster
    MachineSecrets Pulumiverse.Talos.Machine.Inputs.MachineSecrets
    The secrets for the talos cluster
    MachineType string
    The type of machine to generate the configuration for
    ConfigPatches List<string>
    The list of config patches to apply to the generated configuration
    Docs bool
    Whether to generate documentation for the generated configuration
    Examples bool
    Whether to generate examples for the generated configuration
    KubernetesVersion string
    The version of kubernetes to use
    TalosVersion string
    The version of talos features to use in generated machine configuration
    ClusterEndpoint string
    The endpoint of the talos kubernetes cluster
    ClusterName string
    The name of the talos kubernetes cluster
    MachineSecrets MachineSecrets
    The secrets for the talos cluster
    MachineType string
    The type of machine to generate the configuration for
    ConfigPatches []string
    The list of config patches to apply to the generated configuration
    Docs bool
    Whether to generate documentation for the generated configuration
    Examples bool
    Whether to generate examples for the generated configuration
    KubernetesVersion string
    The version of kubernetes to use
    TalosVersion string
    The version of talos features to use in generated machine configuration
    clusterEndpoint String
    The endpoint of the talos kubernetes cluster
    clusterName String
    The name of the talos kubernetes cluster
    machineSecrets MachineSecrets
    The secrets for the talos cluster
    machineType String
    The type of machine to generate the configuration for
    configPatches List<String>
    The list of config patches to apply to the generated configuration
    docs Boolean
    Whether to generate documentation for the generated configuration
    examples Boolean
    Whether to generate examples for the generated configuration
    kubernetesVersion String
    The version of kubernetes to use
    talosVersion String
    The version of talos features to use in generated machine configuration
    clusterEndpoint string
    The endpoint of the talos kubernetes cluster
    clusterName string
    The name of the talos kubernetes cluster
    machineSecrets MachineSecrets
    The secrets for the talos cluster
    machineType string
    The type of machine to generate the configuration for
    configPatches string[]
    The list of config patches to apply to the generated configuration
    docs boolean
    Whether to generate documentation for the generated configuration
    examples boolean
    Whether to generate examples for the generated configuration
    kubernetesVersion string
    The version of kubernetes to use
    talosVersion string
    The version of talos features to use in generated machine configuration
    cluster_endpoint str
    The endpoint of the talos kubernetes cluster
    cluster_name str
    The name of the talos kubernetes cluster
    machine_secrets MachineSecrets
    The secrets for the talos cluster
    machine_type str
    The type of machine to generate the configuration for
    config_patches Sequence[str]
    The list of config patches to apply to the generated configuration
    docs bool
    Whether to generate documentation for the generated configuration
    examples bool
    Whether to generate examples for the generated configuration
    kubernetes_version str
    The version of kubernetes to use
    talos_version str
    The version of talos features to use in generated machine configuration
    clusterEndpoint String
    The endpoint of the talos kubernetes cluster
    clusterName String
    The name of the talos kubernetes cluster
    machineSecrets Property Map
    The secrets for the talos cluster
    machineType String
    The type of machine to generate the configuration for
    configPatches List<String>
    The list of config patches to apply to the generated configuration
    docs Boolean
    Whether to generate documentation for the generated configuration
    examples Boolean
    Whether to generate examples for the generated configuration
    kubernetesVersion String
    The version of kubernetes to use
    talosVersion String
    The version of talos features to use in generated machine configuration

    getConfiguration Result

    The following output properties are available:

    ClusterEndpoint string
    The endpoint of the talos kubernetes cluster
    ClusterName string
    The name of the talos kubernetes cluster
    Id string
    The ID of this resource.
    MachineConfiguration string
    The generated machine configuration
    MachineSecrets Pulumiverse.Talos.Machine.Outputs.MachineSecrets
    The secrets for the talos cluster
    MachineType string
    The type of machine to generate the configuration for
    ConfigPatches List<string>
    The list of config patches to apply to the generated configuration
    Docs bool
    Whether to generate documentation for the generated configuration
    Examples bool
    Whether to generate examples for the generated configuration
    KubernetesVersion string
    The version of kubernetes to use
    TalosVersion string
    The version of talos features to use in generated machine configuration
    ClusterEndpoint string
    The endpoint of the talos kubernetes cluster
    ClusterName string
    The name of the talos kubernetes cluster
    Id string
    The ID of this resource.
    MachineConfiguration string
    The generated machine configuration
    MachineSecrets MachineSecrets
    The secrets for the talos cluster
    MachineType string
    The type of machine to generate the configuration for
    ConfigPatches []string
    The list of config patches to apply to the generated configuration
    Docs bool
    Whether to generate documentation for the generated configuration
    Examples bool
    Whether to generate examples for the generated configuration
    KubernetesVersion string
    The version of kubernetes to use
    TalosVersion string
    The version of talos features to use in generated machine configuration
    clusterEndpoint String
    The endpoint of the talos kubernetes cluster
    clusterName String
    The name of the talos kubernetes cluster
    id String
    The ID of this resource.
    machineConfiguration String
    The generated machine configuration
    machineSecrets MachineSecrets
    The secrets for the talos cluster
    machineType String
    The type of machine to generate the configuration for
    configPatches List<String>
    The list of config patches to apply to the generated configuration
    docs Boolean
    Whether to generate documentation for the generated configuration
    examples Boolean
    Whether to generate examples for the generated configuration
    kubernetesVersion String
    The version of kubernetes to use
    talosVersion String
    The version of talos features to use in generated machine configuration
    clusterEndpoint string
    The endpoint of the talos kubernetes cluster
    clusterName string
    The name of the talos kubernetes cluster
    id string
    The ID of this resource.
    machineConfiguration string
    The generated machine configuration
    machineSecrets MachineSecrets
    The secrets for the talos cluster
    machineType string
    The type of machine to generate the configuration for
    configPatches string[]
    The list of config patches to apply to the generated configuration
    docs boolean
    Whether to generate documentation for the generated configuration
    examples boolean
    Whether to generate examples for the generated configuration
    kubernetesVersion string
    The version of kubernetes to use
    talosVersion string
    The version of talos features to use in generated machine configuration
    cluster_endpoint str
    The endpoint of the talos kubernetes cluster
    cluster_name str
    The name of the talos kubernetes cluster
    id str
    The ID of this resource.
    machine_configuration str
    The generated machine configuration
    machine_secrets MachineSecrets
    The secrets for the talos cluster
    machine_type str
    The type of machine to generate the configuration for
    config_patches Sequence[str]
    The list of config patches to apply to the generated configuration
    docs bool
    Whether to generate documentation for the generated configuration
    examples bool
    Whether to generate examples for the generated configuration
    kubernetes_version str
    The version of kubernetes to use
    talos_version str
    The version of talos features to use in generated machine configuration
    clusterEndpoint String
    The endpoint of the talos kubernetes cluster
    clusterName String
    The name of the talos kubernetes cluster
    id String
    The ID of this resource.
    machineConfiguration String
    The generated machine configuration
    machineSecrets Property Map
    The secrets for the talos cluster
    machineType String
    The type of machine to generate the configuration for
    configPatches List<String>
    The list of config patches to apply to the generated configuration
    docs Boolean
    Whether to generate documentation for the generated configuration
    examples Boolean
    Whether to generate examples for the generated configuration
    kubernetesVersion String
    The version of kubernetes to use
    talosVersion String
    The version of talos features to use in generated machine configuration

    Supporting Types

    Certificate

    Cert string
    Certificate
    Key string
    Private Key
    Cert string
    Certificate
    Key string
    Private Key
    cert String
    Certificate
    key String
    Private Key
    cert string
    Certificate
    key string
    Private Key
    cert str
    Certificate
    key str
    Private Key
    cert String
    Certificate
    key String
    Private Key

    Certificates

    Cluster

    Id string
    Certificate
    Secret string
    Private Key
    Id string
    Certificate
    Secret string
    Private Key
    id String
    Certificate
    secret String
    Private Key
    id string
    Certificate
    secret string
    Private Key
    id str
    Certificate
    secret str
    Private Key
    id String
    Certificate
    secret String
    Private Key

    Key

    Key string
    Private Key
    Key string
    Private Key
    key String
    Private Key
    key string
    Private Key
    key str
    Private Key
    key String
    Private Key

    MachineSecrets

    Secrets

    Bootstrap_token string
    The bootstrap token for the talos kubernetes cluster
    Secretbox_encryption_secret string
    The secretbox encryption secret for the talos kubernetes cluster
    Bootstrap_token string
    The bootstrap token for the talos kubernetes cluster
    Secretbox_encryption_secret string
    The secretbox encryption secret for the talos kubernetes cluster
    bootstrap_token String
    The bootstrap token for the talos kubernetes cluster
    secretbox_encryption_secret String
    The secretbox encryption secret for the talos kubernetes cluster
    bootstrap_token string
    The bootstrap token for the talos kubernetes cluster
    secretbox_encryption_secret string
    The secretbox encryption secret for the talos kubernetes cluster
    bootstrap_token str
    The bootstrap token for the talos kubernetes cluster
    secretbox_encryption_secret str
    The secretbox encryption secret for the talos kubernetes cluster
    bootstrap_token String
    The bootstrap token for the talos kubernetes cluster
    secretbox_encryption_secret String
    The secretbox encryption secret for the talos kubernetes cluster

    TrustdInfo

    Token string
    The trustd token for the talos kubernetes cluster
    Token string
    The trustd token for the talos kubernetes cluster
    token String
    The trustd token for the talos kubernetes cluster
    token string
    The trustd token for the talos kubernetes cluster
    token str
    The trustd token for the talos kubernetes cluster
    token String
    The trustd token for the talos kubernetes cluster

    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.2.0 published on Thursday, Dec 21, 2023 by Pulumiverse