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

talos.machine.getConfiguration

Explore with Pulumi AI

talos v0.5.2 published on Thursday, Jan 23, 2025 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

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,
});
Copy
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)
Copy
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
	})
}
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.Machine.GetConfiguration.Invoke(new()
    {
        ClusterName = "example-cluster",
        MachineType = "controlplane",
        ClusterEndpoint = "https://cluster.local:6443",
        MachineSecrets = thisSecrets.MachineSecrets,
    });

});
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.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());

    }
}
Copy
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}
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(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]
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:machine/getConfiguration:getConfiguration
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterEndpoint This property is required. string
The endpoint of the talos kubernetes cluster
ClusterName This property is required. string
The name of the talos kubernetes cluster
MachineSecrets This property is required. Pulumiverse.Talos.Machine.Inputs.MachineSecrets
The secrets for the talos cluster
MachineType This property is required. 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. Defaults to false
Examples bool
Whether to generate examples for the generated configuration. Defaults to false
KubernetesVersion string
The version of kubernetes to use
TalosVersion string
The version of talos features to use in generated machine configuration
ClusterEndpoint This property is required. string
The endpoint of the talos kubernetes cluster
ClusterName This property is required. string
The name of the talos kubernetes cluster
MachineSecrets This property is required. MachineSecrets
The secrets for the talos cluster
MachineType This property is required. 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. Defaults to false
Examples bool
Whether to generate examples for the generated configuration. Defaults to false
KubernetesVersion string
The version of kubernetes to use
TalosVersion string
The version of talos features to use in generated machine configuration
clusterEndpoint This property is required. String
The endpoint of the talos kubernetes cluster
clusterName This property is required. String
The name of the talos kubernetes cluster
machineSecrets This property is required. MachineSecrets
The secrets for the talos cluster
machineType This property is required. 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. Defaults to false
examples Boolean
Whether to generate examples for the generated configuration. Defaults to false
kubernetesVersion String
The version of kubernetes to use
talosVersion String
The version of talos features to use in generated machine configuration
clusterEndpoint This property is required. string
The endpoint of the talos kubernetes cluster
clusterName This property is required. string
The name of the talos kubernetes cluster
machineSecrets This property is required. MachineSecrets
The secrets for the talos cluster
machineType This property is required. 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. Defaults to false
examples boolean
Whether to generate examples for the generated configuration. Defaults to false
kubernetesVersion string
The version of kubernetes to use
talosVersion string
The version of talos features to use in generated machine configuration
cluster_endpoint This property is required. str
The endpoint of the talos kubernetes cluster
cluster_name This property is required. str
The name of the talos kubernetes cluster
machine_secrets This property is required. MachineSecrets
The secrets for the talos cluster
machine_type This property is required. 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
clusterEndpoint This property is required. String
The endpoint of the talos kubernetes cluster
clusterName This property is required. String
The name of the talos kubernetes cluster
machineSecrets This property is required. Property Map
The secrets for the talos cluster
machineType This property is required. 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. Defaults to false
examples Boolean
Whether to generate examples for the generated configuration. Defaults to false
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. Defaults to false
Examples bool
Whether to generate examples for the generated configuration. Defaults to false
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. Defaults to false
Examples bool
Whether to generate examples for the generated configuration. Defaults to false
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. Defaults to false
examples Boolean
Whether to generate examples for the generated configuration. Defaults to false
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. Defaults to false
examples boolean
Whether to generate examples for the generated configuration. Defaults to false
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. 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
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. Defaults to false
examples Boolean
Whether to generate examples for the generated configuration. Defaults to false
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 This property is required. string
Certificate
Key This property is required. string
Private Key
Cert This property is required. string
Certificate
Key This property is required. string
Private Key
cert This property is required. String
Certificate
key This property is required. String
Private Key
cert This property is required. string
Certificate
key This property is required. string
Private Key
cert This property is required. str
Certificate
key This property is required. str
Private Key
cert This property is required. String
Certificate
key This property is required. String
Private Key

Certificates

Etcd This property is required. Certificate
K8s This property is required. Certificate
K8sAggregator This property is required. Certificate
K8sServiceaccount This property is required. Key
Os This property is required. Certificate
etcd This property is required. Certificate
k8s This property is required. Certificate
k8sAggregator This property is required. Certificate
k8sServiceaccount This property is required. Key
os This property is required. Certificate
etcd This property is required. Certificate
k8s This property is required. Certificate
k8sAggregator This property is required. Certificate
k8sServiceaccount This property is required. Key
os This property is required. Certificate
etcd This property is required. Certificate
k8s This property is required. Certificate
k8s_aggregator This property is required. Certificate
k8s_serviceaccount This property is required. Key
os This property is required. Certificate
etcd This property is required. Property Map
k8s This property is required. Property Map
k8sAggregator This property is required. Property Map
k8sServiceaccount This property is required. Property Map
os This property is required. Property Map

Cluster

Id This property is required. string
Certificate
Secret This property is required. string
Private Key
Id This property is required. string
Certificate
Secret This property is required. string
Private Key
id This property is required. String
Certificate
secret This property is required. String
Private Key
id This property is required. string
Certificate
secret This property is required. string
Private Key
id This property is required. str
Certificate
secret This property is required. str
Private Key
id This property is required. String
Certificate
secret This property is required. String
Private Key

Key

Key This property is required. string
Private Key
Key This property is required. string
Private Key
key This property is required. String
Private Key
key This property is required. string
Private Key
key This property is required. str
Private Key
key This property is required. String
Private Key

KubernetesSecrets

BootstrapToken This property is required. string
The bootstrap token for the talos kubernetes cluster
SecretboxEncryptionSecret This property is required. string
The secretbox encryption secret for the talos kubernetes cluster
AescbcEncryptionSecret string
The aescbc encryption secret for the talos kubernetes cluster
BootstrapToken This property is required. string
The bootstrap token for the talos kubernetes cluster
SecretboxEncryptionSecret This property is required. string
The secretbox encryption secret for the talos kubernetes cluster
AescbcEncryptionSecret string
The aescbc encryption secret for the talos kubernetes cluster
bootstrapToken This property is required. String
The bootstrap token for the talos kubernetes cluster
secretboxEncryptionSecret This property is required. String
The secretbox encryption secret for the talos kubernetes cluster
aescbcEncryptionSecret String
The aescbc encryption secret for the talos kubernetes cluster
bootstrapToken This property is required. string
The bootstrap token for the talos kubernetes cluster
secretboxEncryptionSecret This property is required. string
The secretbox encryption secret for the talos kubernetes cluster
aescbcEncryptionSecret string
The aescbc encryption secret for the talos kubernetes cluster
bootstrap_token This property is required. str
The bootstrap token for the talos kubernetes cluster
secretbox_encryption_secret This property is required. str
The secretbox encryption secret for the talos kubernetes cluster
aescbc_encryption_secret str
The aescbc encryption secret for the talos kubernetes cluster
bootstrapToken This property is required. String
The bootstrap token for the talos kubernetes cluster
secretboxEncryptionSecret This property is required. String
The secretbox encryption secret for the talos kubernetes cluster
aescbcEncryptionSecret String
The aescbc encryption secret for the talos kubernetes cluster

MachineSecrets

Certs This property is required. Certificates
Cluster This property is required. Cluster
Secrets This property is required. KubernetesSecrets
Trustdinfo This property is required. TrustdInfo
certs This property is required. Certificates
cluster This property is required. Cluster
secrets This property is required. KubernetesSecrets
trustdinfo This property is required. TrustdInfo
certs This property is required. Certificates
cluster This property is required. Cluster
secrets This property is required. KubernetesSecrets
trustdinfo This property is required. TrustdInfo
certs This property is required. Certificates
cluster This property is required. Cluster
secrets This property is required. KubernetesSecrets
trustdinfo This property is required. TrustdInfo
certs This property is required. Property Map
cluster This property is required. Property Map
secrets This property is required. Property Map
trustdinfo This property is required. Property Map

TrustdInfo

Token This property is required. string
The trustd token for the talos kubernetes cluster
Token This property is required. string
The trustd token for the talos kubernetes cluster
token This property is required. String
The trustd token for the talos kubernetes cluster
token This property is required. string
The trustd token for the talos kubernetes cluster
token This property is required. str
The trustd token for the talos kubernetes cluster
token This property is required. 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 v0.5.2 published on Thursday, Jan 23, 2025 by Pulumiverse