talos v0.2.0 published on Thursday, Dec 21, 2023 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_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:
- 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
- Examples bool
- Whether to generate examples for the generated configuration
- 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
- Examples bool
- Whether to generate examples for the generated configuration
- 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
- examples Boolean
- Whether to generate examples for the generated configuration
- 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
- examples boolean
- Whether to generate examples for the generated configuration
- 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
- 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
- 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
- examples Boolean
- Whether to generate examples for the generated configuration
- 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
- Examples bool
- Whether to generate examples for the generated configuration
- 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
- Examples bool
- Whether to generate examples for the generated configuration
- 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
- examples Boolean
- Whether to generate examples for the generated configuration
- 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
- examples boolean
- Whether to generate examples for the generated configuration
- 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
- 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
- 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
- examples Boolean
- Whether to generate examples for the generated configuration
- 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
MachineSecrets
Secrets
- Bootstrap_
token string - The bootstrap token for the talos kubernetes cluster
- Secretbox_
encryption_ stringsecret - The secretbox 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
- bootstrap_
token String - The bootstrap token for the talos kubernetes cluster
- secretbox_
encryption_ Stringsecret - The secretbox 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
- bootstrap_
token str - The bootstrap token for the talos kubernetes cluster
- secretbox_
encryption_ strsecret - The secretbox 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
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.