talos v0.5.2 published on Thursday, Jan 23, 2025 by Pulumiverse
talos.machine.getDisks
Explore with Pulumi AI
Generate a machine configuration for a node type
Note: Since Talos natively supports
.machine.install.diskSelector
, thetalos.machine.getDisks
data source maybe just used to query disk information that could be used elsewhere. It’s recommended to usemachine.install.diskSelector
in Talos machine configuration.
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.getDisksOutput({
clientConfiguration: thisSecrets.clientConfiguration,
node: "10.5.0.2",
filters: {
size: "> 100GB",
type: "nvme",
},
});
export const nvmeDisks = _this.apply(_this => _this.disks.map(__item => __item.name));
import pulumi
import pulumi_talos as talos
import pulumiverse_talos as talos
this_secrets = talos.machine.Secrets("this")
this = talos.machine.get_disks_output(client_configuration=this_secrets.client_configuration,
node="10.5.0.2",
filters={
"size": "> 100GB",
"type": "nvme",
})
pulumi.export("nvmeDisks", this.apply(lambda this: [__item.name for __item in this.disks]))
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
}
this := machine.GetDisksOutput(ctx, machine.GetDisksOutputArgs{
ClientConfiguration: thisSecrets.ClientConfiguration,
Node: pulumi.String("10.5.0.2"),
Filters: &machine.GetDisksFiltersArgs{
Size: pulumi.String("> 100GB"),
Type: pulumi.String("nvme"),
},
}, nil);
ctx.Export("nvmeDisks", this.ApplyT(func(this machine.GetDisksResult) ([]*string, error) {
var splat0 []*string
for _, val0 := range this.Disks {
splat0 = append(splat0, val0.Name)
}
return splat0, nil
}).(pulumi.[]*stringOutput))
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.GetDisks.Invoke(new()
{
ClientConfiguration = thisSecrets.ClientConfiguration,
Node = "10.5.0.2",
Filters = new Talos.Machine.Inputs.GetDisksFiltersInputArgs
{
Size = "> 100GB",
Type = "nvme",
},
});
return new Dictionary<string, object?>
{
["nvmeDisks"] = @this.Apply(@this => @this.Apply(getDisksResult => getDisksResult.Disks).Select(__item => __item.Name).ToList()),
};
});
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.GetDisksArgs;
import com.pulumi.talos.machine.inputs.GetDisksFiltersArgs;
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.getDisks(GetDisksArgs.builder()
.clientConfiguration(thisSecrets.clientConfiguration())
.node("10.5.0.2")
.filters(GetDisksFiltersArgs.builder()
.size("> 100GB")
.type("nvme")
.build())
.build());
ctx.export("nvmeDisks", this_.applyValue(this_ -> this_.disks().stream().map(element -> element.name()).collect(toList())));
}
}
Coming soon!
Using getDisks
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 getDisks(args: GetDisksArgs, opts?: InvokeOptions): Promise<GetDisksResult>
function getDisksOutput(args: GetDisksOutputArgs, opts?: InvokeOptions): Output<GetDisksResult>
def get_disks(client_configuration: Optional[GetDisksClientConfiguration] = None,
endpoint: Optional[str] = None,
filters: Optional[GetDisksFilters] = None,
node: Optional[str] = None,
timeouts: Optional[GetDisksTimeouts] = None,
opts: Optional[InvokeOptions] = None) -> GetDisksResult
def get_disks_output(client_configuration: Optional[pulumi.Input[GetDisksClientConfigurationArgs]] = None,
endpoint: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[GetDisksFiltersArgs]] = None,
node: Optional[pulumi.Input[str]] = None,
timeouts: Optional[pulumi.Input[GetDisksTimeoutsArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDisksResult]
func GetDisks(ctx *Context, args *GetDisksArgs, opts ...InvokeOption) (*GetDisksResult, error)
func GetDisksOutput(ctx *Context, args *GetDisksOutputArgs, opts ...InvokeOption) GetDisksResultOutput
> Note: This function is named GetDisks
in the Go SDK.
public static class GetDisks
{
public static Task<GetDisksResult> InvokeAsync(GetDisksArgs args, InvokeOptions? opts = null)
public static Output<GetDisksResult> Invoke(GetDisksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDisksResult> getDisks(GetDisksArgs args, InvokeOptions options)
public static Output<GetDisksResult> getDisks(GetDisksArgs args, InvokeOptions options)
fn::invoke:
function: talos:machine/getDisks:getDisks
arguments:
# arguments dictionary
The following arguments are supported:
- Client
Configuration This property is required. Pulumiverse.Talos. Machine. Inputs. Get Disks Client Configuration - The client configuration data
- Node
This property is required. string - controlplane node to retrieve the kubeconfig from
- Endpoint string
- endpoint to use for the talosclient. If not set, the node value will be used
- Filters
Pulumiverse.
Talos. Machine. Inputs. Get Disks Filters - Filters to apply to the disks
- Timeouts
Pulumiverse.
Talos. Machine. Inputs. Get Disks Timeouts
- Client
Configuration This property is required. GetDisks Client Configuration - The client configuration data
- Node
This property is required. string - controlplane node to retrieve the kubeconfig from
- Endpoint string
- endpoint to use for the talosclient. If not set, the node value will be used
- Filters
Get
Disks Filters - Filters to apply to the disks
- Timeouts
Get
Disks Timeouts
- client
Configuration This property is required. GetDisks Client Configuration - The client configuration data
- node
This property is required. String - controlplane node to retrieve the kubeconfig from
- endpoint String
- endpoint to use for the talosclient. If not set, the node value will be used
- filters
Get
Disks Filters - Filters to apply to the disks
- timeouts
Get
Disks Timeouts
- client
Configuration This property is required. GetDisks Client Configuration - The client configuration data
- node
This property is required. string - controlplane node to retrieve the kubeconfig from
- endpoint string
- endpoint to use for the talosclient. If not set, the node value will be used
- filters
Get
Disks Filters - Filters to apply to the disks
- timeouts
Get
Disks Timeouts
- client_
configuration This property is required. GetDisks Client Configuration - The client configuration data
- node
This property is required. str - controlplane node to retrieve the kubeconfig from
- endpoint str
- endpoint to use for the talosclient. If not set, the node value will be used
- filters
Get
Disks Filters - Filters to apply to the disks
- timeouts
Get
Disks Timeouts
- client
Configuration This property is required. Property Map - The client configuration data
- node
This property is required. String - controlplane node to retrieve the kubeconfig from
- endpoint String
- endpoint to use for the talosclient. If not set, the node value will be used
- filters Property Map
- Filters to apply to the disks
- timeouts Property Map
getDisks Result
The following output properties are available:
- Client
Configuration Pulumiverse.Talos. Machine. Outputs. Get Disks Client Configuration - The client configuration data
- Disks
List<Pulumiverse.
Talos. Machine. Outputs. Get Disks Disk> - The disks that match the filters
- Endpoint string
- endpoint to use for the talosclient. If not set, the node value will be used
- Id string
- The generated ID of this resource
- Node string
- controlplane node to retrieve the kubeconfig from
- Filters
Pulumiverse.
Talos. Machine. Outputs. Get Disks Filters - Filters to apply to the disks
- Timeouts
Pulumiverse.
Talos. Machine. Outputs. Get Disks Timeouts
- Client
Configuration GetDisks Client Configuration - The client configuration data
- Disks
[]Get
Disks Disk - The disks that match the filters
- Endpoint string
- endpoint to use for the talosclient. If not set, the node value will be used
- Id string
- The generated ID of this resource
- Node string
- controlplane node to retrieve the kubeconfig from
- Filters
Get
Disks Filters - Filters to apply to the disks
- Timeouts
Get
Disks Timeouts
- client
Configuration GetDisks Client Configuration - The client configuration data
- disks
List<Get
Disks Disk> - The disks that match the filters
- endpoint String
- endpoint to use for the talosclient. If not set, the node value will be used
- id String
- The generated ID of this resource
- node String
- controlplane node to retrieve the kubeconfig from
- filters
Get
Disks Filters - Filters to apply to the disks
- timeouts
Get
Disks Timeouts
- client
Configuration GetDisks Client Configuration - The client configuration data
- disks
Get
Disks Disk[] - The disks that match the filters
- endpoint string
- endpoint to use for the talosclient. If not set, the node value will be used
- id string
- The generated ID of this resource
- node string
- controlplane node to retrieve the kubeconfig from
- filters
Get
Disks Filters - Filters to apply to the disks
- timeouts
Get
Disks Timeouts
- client_
configuration GetDisks Client Configuration - The client configuration data
- disks
Sequence[Get
Disks Disk] - The disks that match the filters
- endpoint str
- endpoint to use for the talosclient. If not set, the node value will be used
- id str
- The generated ID of this resource
- node str
- controlplane node to retrieve the kubeconfig from
- filters
Get
Disks Filters - Filters to apply to the disks
- timeouts
Get
Disks Timeouts
- client
Configuration Property Map - The client configuration data
- disks List<Property Map>
- The disks that match the filters
- endpoint String
- endpoint to use for the talosclient. If not set, the node value will be used
- id String
- The generated ID of this resource
- node String
- controlplane node to retrieve the kubeconfig from
- filters Property Map
- Filters to apply to the disks
- timeouts Property Map
Supporting Types
GetDisksClientConfiguration
- Ca
Certificate This property is required. string - The client CA certificate
- Client
Certificate This property is required. string - The client certificate
- Client
Key This property is required. string - The client key
- Ca
Certificate This property is required. string - The client CA certificate
- Client
Certificate This property is required. string - The client certificate
- Client
Key This property is required. string - The client key
- ca
Certificate This property is required. String - The client CA certificate
- client
Certificate This property is required. String - The client certificate
- client
Key This property is required. String - The client key
- ca
Certificate This property is required. string - The client CA certificate
- client
Certificate This property is required. string - The client certificate
- client
Key This property is required. string - The client key
- ca_
certificate This property is required. str - The client CA certificate
- client_
certificate This property is required. str - The client certificate
- client_
key This property is required. str - The client key
- ca
Certificate This property is required. String - The client CA certificate
- client
Certificate This property is required. String - The client certificate
- client
Key This property is required. String - The client key
GetDisksDisk
- Bus
Path This property is required. string - The bus path of the disk
- Modalias
This property is required. string - The modalias of the disk
- Model
This property is required. string - The model of the disk
- Name
This property is required. string - The name of the disk
- Serial
This property is required. string - The serial number of the disk
- Size
This property is required. string - The size of the disk
- Type
This property is required. string - The type of the disk
- Uuid
This property is required. string - The uuid of the disk
- Wwid
This property is required. string - The wwid of the disk
- Bus
Path This property is required. string - The bus path of the disk
- Modalias
This property is required. string - The modalias of the disk
- Model
This property is required. string - The model of the disk
- Name
This property is required. string - The name of the disk
- Serial
This property is required. string - The serial number of the disk
- Size
This property is required. string - The size of the disk
- Type
This property is required. string - The type of the disk
- Uuid
This property is required. string - The uuid of the disk
- Wwid
This property is required. string - The wwid of the disk
- bus
Path This property is required. String - The bus path of the disk
- modalias
This property is required. String - The modalias of the disk
- model
This property is required. String - The model of the disk
- name
This property is required. String - The name of the disk
- serial
This property is required. String - The serial number of the disk
- size
This property is required. String - The size of the disk
- type
This property is required. String - The type of the disk
- uuid
This property is required. String - The uuid of the disk
- wwid
This property is required. String - The wwid of the disk
- bus
Path This property is required. string - The bus path of the disk
- modalias
This property is required. string - The modalias of the disk
- model
This property is required. string - The model of the disk
- name
This property is required. string - The name of the disk
- serial
This property is required. string - The serial number of the disk
- size
This property is required. string - The size of the disk
- type
This property is required. string - The type of the disk
- uuid
This property is required. string - The uuid of the disk
- wwid
This property is required. string - The wwid of the disk
- bus_
path This property is required. str - The bus path of the disk
- modalias
This property is required. str - The modalias of the disk
- model
This property is required. str - The model of the disk
- name
This property is required. str - The name of the disk
- serial
This property is required. str - The serial number of the disk
- size
This property is required. str - The size of the disk
- type
This property is required. str - The type of the disk
- uuid
This property is required. str - The uuid of the disk
- wwid
This property is required. str - The wwid of the disk
- bus
Path This property is required. String - The bus path of the disk
- modalias
This property is required. String - The modalias of the disk
- model
This property is required. String - The model of the disk
- name
This property is required. String - The name of the disk
- serial
This property is required. String - The serial number of the disk
- size
This property is required. String - The size of the disk
- type
This property is required. String - The type of the disk
- uuid
This property is required. String - The uuid of the disk
- wwid
This property is required. String - The wwid of the disk
GetDisksFilters
- Bus
Path string - Filter disks by bus path
- Modalias string
- Filter disks by modalias
- Model string
- Filter disks by model
- Name string
- Filter disks by name
- Serial string
- Filter disks by serial number
- Size string
- Filter disks by size
- Type string
- Filter disks by type
- Uuid string
- Filter disks by uuid
- Wwid string
- Filter disks by wwid
- Bus
Path string - Filter disks by bus path
- Modalias string
- Filter disks by modalias
- Model string
- Filter disks by model
- Name string
- Filter disks by name
- Serial string
- Filter disks by serial number
- Size string
- Filter disks by size
- Type string
- Filter disks by type
- Uuid string
- Filter disks by uuid
- Wwid string
- Filter disks by wwid
- bus
Path String - Filter disks by bus path
- modalias String
- Filter disks by modalias
- model String
- Filter disks by model
- name String
- Filter disks by name
- serial String
- Filter disks by serial number
- size String
- Filter disks by size
- type String
- Filter disks by type
- uuid String
- Filter disks by uuid
- wwid String
- Filter disks by wwid
- bus
Path string - Filter disks by bus path
- modalias string
- Filter disks by modalias
- model string
- Filter disks by model
- name string
- Filter disks by name
- serial string
- Filter disks by serial number
- size string
- Filter disks by size
- type string
- Filter disks by type
- uuid string
- Filter disks by uuid
- wwid string
- Filter disks by wwid
- bus
Path String - Filter disks by bus path
- modalias String
- Filter disks by modalias
- model String
- Filter disks by model
- name String
- Filter disks by name
- serial String
- Filter disks by serial number
- size String
- Filter disks by size
- type String
- Filter disks by type
- uuid String
- Filter disks by uuid
- wwid String
- Filter disks by wwid
GetDisksTimeouts
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- read str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Package Details
- Repository
- talos pulumiverse/pulumi-talos
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
talos
Terraform Provider.