talos v0.5.2 published on Thursday, Jan 23, 2025 by Pulumiverse
talos.machine.getConfiguration
Explore with Pulumi AI
Generate a machine configuration for a node type
Note: It is recommended to set the optional
talos_versionattribute. 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
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.machine.getConfigurationOutput({
    clusterName: "example-cluster",
    machineType: "controlplane",
    clusterEndpoint: "https://cluster.local:6443",
    machineSecrets: thisSecrets.machineSecrets,
});
import pulumi
import pulumi_talos as talos
import pulumiverse_talos as talos
this_secrets = talos.machine.Secrets("this")
this = talos.machine.get_configuration_output(cluster_name="example-cluster",
    machine_type="controlplane",
    cluster_endpoint="https://cluster.local:6443",
    machine_secrets=this_secrets.machine_secrets)
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, "this", 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
	})
}
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.Machine.GetConfiguration.Invoke(new()
    {
        ClusterName = "example-cluster",
        MachineType = "controlplane",
        ClusterEndpoint = "https://cluster.local:6443",
        MachineSecrets = thisSecrets.MachineSecrets,
    });
});
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 this = MachineFunctions.getConfiguration(GetConfigurationArgs.builder()
            .clusterName("example-cluster")
            .machineType("controlplane")
            .clusterEndpoint("https://cluster.local:6443")
            .machineSecrets(thisSecrets.machineSecrets())
            .build());
    }
}
resources:
  thisSecrets:
    type: talos:machine:Secrets
    name: this
variables:
  this:
    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)
public static Output<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
fn::invoke:
  function: talos:machine/getConfiguration:getConfiguration
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Cluster
Endpoint string - The endpoint of the talos kubernetes cluster
 - Cluster
Name string - The name of the talos kubernetes cluster
 - Machine
Secrets Pulumiverse.Talos. Machine. Inputs. Machine Secrets  - The secrets for the talos cluster
 - Machine
Type string - The type of machine to generate the configuration for
 - Config
Patches List<string> - The list of config patches to apply to the generated configuration
 - Docs bool
 - Whether to generate documentation for the generated configuration. Defaults to false
 - Examples bool
 - Whether to generate examples for the generated configuration. Defaults to false
 - Kubernetes
Version string - The version of kubernetes to use
 - Talos
Version string - The version of talos features to use in generated machine configuration
 
- Cluster
Endpoint string - The endpoint of the talos kubernetes cluster
 - Cluster
Name string - The name of the talos kubernetes cluster
 - Machine
Secrets MachineSecrets  - The secrets for the talos cluster
 - Machine
Type string - The type of machine to generate the configuration for
 - Config
Patches []string - The list of config patches to apply to the generated configuration
 - Docs bool
 - Whether to generate documentation for the generated configuration. Defaults to false
 - Examples bool
 - Whether to generate examples for the generated configuration. Defaults to false
 - Kubernetes
Version string - The version of kubernetes to use
 - Talos
Version string - The version of talos features to use in generated machine configuration
 
- cluster
Endpoint String - The endpoint of the talos kubernetes cluster
 - cluster
Name String - The name of the talos kubernetes cluster
 - machine
Secrets MachineSecrets  - The secrets for the talos cluster
 - machine
Type String - The type of machine to generate the configuration for
 - config
Patches List<String> - The list of config patches to apply to the generated configuration
 - docs Boolean
 - Whether to generate documentation for the generated configuration. Defaults to false
 - examples Boolean
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes
Version String - The version of kubernetes to use
 - talos
Version String - The version of talos features to use in generated machine configuration
 
- cluster
Endpoint string - The endpoint of the talos kubernetes cluster
 - cluster
Name string - The name of the talos kubernetes cluster
 - machine
Secrets MachineSecrets  - The secrets for the talos cluster
 - machine
Type string - The type of machine to generate the configuration for
 - config
Patches string[] - The list of config patches to apply to the generated configuration
 - docs boolean
 - Whether to generate documentation for the generated configuration. Defaults to false
 - examples boolean
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes
Version string - The version of kubernetes to use
 - talos
Version 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. Defaults to false
 - examples bool
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes_
version str - The version of kubernetes to use
 - talos_
version str - The version of talos features to use in generated machine configuration
 
- cluster
Endpoint String - The endpoint of the talos kubernetes cluster
 - cluster
Name String - The name of the talos kubernetes cluster
 - machine
Secrets Property Map - The secrets for the talos cluster
 - machine
Type String - The type of machine to generate the configuration for
 - config
Patches List<String> - The list of config patches to apply to the generated configuration
 - docs Boolean
 - Whether to generate documentation for the generated configuration. Defaults to false
 - examples Boolean
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes
Version String - The version of kubernetes to use
 - talos
Version String - The version of talos features to use in generated machine configuration
 
getConfiguration Result
The following output properties are available:
- Cluster
Endpoint string - The endpoint of the talos kubernetes cluster
 - Cluster
Name string - The name of the talos kubernetes cluster
 - Id string
 - The ID of this resource.
 - Machine
Configuration string - The generated machine configuration
 - Machine
Secrets Pulumiverse.Talos. Machine. Outputs. Machine Secrets  - The secrets for the talos cluster
 - Machine
Type string - The type of machine to generate the configuration for
 - Config
Patches List<string> - The list of config patches to apply to the generated configuration
 - Docs bool
 - Whether to generate documentation for the generated configuration. Defaults to false
 - Examples bool
 - Whether to generate examples for the generated configuration. Defaults to false
 - Kubernetes
Version string - The version of kubernetes to use
 - Talos
Version string - The version of talos features to use in generated machine configuration
 
- Cluster
Endpoint string - The endpoint of the talos kubernetes cluster
 - Cluster
Name string - The name of the talos kubernetes cluster
 - Id string
 - The ID of this resource.
 - Machine
Configuration string - The generated machine configuration
 - Machine
Secrets MachineSecrets  - The secrets for the talos cluster
 - Machine
Type string - The type of machine to generate the configuration for
 - Config
Patches []string - The list of config patches to apply to the generated configuration
 - Docs bool
 - Whether to generate documentation for the generated configuration. Defaults to false
 - Examples bool
 - Whether to generate examples for the generated configuration. Defaults to false
 - Kubernetes
Version string - The version of kubernetes to use
 - Talos
Version string - The version of talos features to use in generated machine configuration
 
- cluster
Endpoint String - The endpoint of the talos kubernetes cluster
 - cluster
Name String - The name of the talos kubernetes cluster
 - id String
 - The ID of this resource.
 - machine
Configuration String - The generated machine configuration
 - machine
Secrets MachineSecrets  - The secrets for the talos cluster
 - machine
Type String - The type of machine to generate the configuration for
 - config
Patches List<String> - The list of config patches to apply to the generated configuration
 - docs Boolean
 - Whether to generate documentation for the generated configuration. Defaults to false
 - examples Boolean
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes
Version String - The version of kubernetes to use
 - talos
Version String - The version of talos features to use in generated machine configuration
 
- cluster
Endpoint string - The endpoint of the talos kubernetes cluster
 - cluster
Name string - The name of the talos kubernetes cluster
 - id string
 - The ID of this resource.
 - machine
Configuration string - The generated machine configuration
 - machine
Secrets MachineSecrets  - The secrets for the talos cluster
 - machine
Type string - The type of machine to generate the configuration for
 - config
Patches string[] - The list of config patches to apply to the generated configuration
 - docs boolean
 - Whether to generate documentation for the generated configuration. Defaults to false
 - examples boolean
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes
Version string - The version of kubernetes to use
 - talos
Version 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. Defaults to false
 - examples bool
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes_
version str - The version of kubernetes to use
 - talos_
version str - The version of talos features to use in generated machine configuration
 
- cluster
Endpoint String - The endpoint of the talos kubernetes cluster
 - cluster
Name String - The name of the talos kubernetes cluster
 - id String
 - The ID of this resource.
 - machine
Configuration String - The generated machine configuration
 - machine
Secrets Property Map - The secrets for the talos cluster
 - machine
Type String - The type of machine to generate the configuration for
 - config
Patches List<String> - The list of config patches to apply to the generated configuration
 - docs Boolean
 - Whether to generate documentation for the generated configuration. Defaults to false
 - examples Boolean
 - Whether to generate examples for the generated configuration. Defaults to false
 - kubernetes
Version String - The version of kubernetes to use
 - talos
Version String - The version of talos features to use in generated machine configuration
 
Supporting Types
Certificate
Certificates
Cluster
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
 
KubernetesSecrets 
- Bootstrap
Token string - The bootstrap token for the talos kubernetes cluster
 - Secretbox
Encryption stringSecret  - The secretbox encryption secret for the talos kubernetes cluster
 - Aescbc
Encryption stringSecret  - The aescbc encryption secret for the talos kubernetes cluster
 
- Bootstrap
Token string - The bootstrap token for the talos kubernetes cluster
 - Secretbox
Encryption stringSecret  - The secretbox encryption secret for the talos kubernetes cluster
 - Aescbc
Encryption stringSecret  - The aescbc encryption secret for the talos kubernetes cluster
 
- bootstrap
Token String - The bootstrap token for the talos kubernetes cluster
 - secretbox
Encryption StringSecret  - The secretbox encryption secret for the talos kubernetes cluster
 - aescbc
Encryption StringSecret  - The aescbc encryption secret for the talos kubernetes cluster
 
- bootstrap
Token string - The bootstrap token for the talos kubernetes cluster
 - secretbox
Encryption stringSecret  - The secretbox encryption secret for the talos kubernetes cluster
 - aescbc
Encryption stringSecret  - The aescbc encryption secret for the talos kubernetes cluster
 
- bootstrap_
token str - The bootstrap token for the talos kubernetes cluster
 - secretbox_
encryption_ strsecret  - The secretbox encryption secret for the talos kubernetes cluster
 - aescbc_
encryption_ strsecret  - The aescbc encryption secret for the talos kubernetes cluster
 
- bootstrap
Token String - The bootstrap token for the talos kubernetes cluster
 - secretbox
Encryption StringSecret  - The secretbox encryption secret for the talos kubernetes cluster
 - aescbc
Encryption StringSecret  - The aescbc encryption secret for the talos kubernetes cluster
 
MachineSecrets 
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 
talosTerraform Provider.