Linode v4.30.0 published on Friday, Nov 8, 2024 by Pulumi
linode.getLkeClusters
Explore with Pulumi AI
Provides information about a list of current Linode Kubernetes (LKE) clusters on your account that match a set of filters. For more information, see the Linode APIv4 docs.
Example Usage
Get information about all LKE clusters with a specific tag:
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const specific = linode.getLkeClusters({
filters: [{
name: "tags",
values: ["test-tag"],
}],
});
export const lkeCluster = specific.then(specific => specific.lkeClusters?.[0]?.id);
import pulumi
import pulumi_linode as linode
specific = linode.get_lke_clusters(filters=[{
"name": "tags",
"values": ["test-tag"],
}])
pulumi.export("lkeCluster", specific.lke_clusters[0].id)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
specific, err := linode.GetLkeClusters(ctx, &linode.GetLkeClustersArgs{
Filters: []linode.GetLkeClustersFilter{
{
Name: "tags",
Values: []string{
"test-tag",
},
},
},
}, nil)
if err != nil {
return err
}
ctx.Export("lkeCluster", specific.LkeClusters[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var specific = Linode.GetLkeClusters.Invoke(new()
{
Filters = new[]
{
new Linode.Inputs.GetLkeClustersFilterInputArgs
{
Name = "tags",
Values = new[]
{
"test-tag",
},
},
},
});
return new Dictionary<string, object?>
{
["lkeCluster"] = specific.Apply(getLkeClustersResult => getLkeClustersResult.LkeClusters[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetLkeClustersArgs;
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) {
final var specific = LinodeFunctions.getLkeClusters(GetLkeClustersArgs.builder()
.filters(GetLkeClustersFilterArgs.builder()
.name("tags")
.values("test-tag")
.build())
.build());
ctx.export("lkeCluster", specific.applyValue(getLkeClustersResult -> getLkeClustersResult.lkeClusters()[0].id()));
}
}
variables:
specific:
fn::invoke:
Function: linode:getLkeClusters
Arguments:
filters:
- name: tags
values:
- test-tag
outputs:
lkeCluster: ${specific.lkeClusters[0].id}
Filterable Fields
k8s_version
label
region
tags
status
created
updated
Using getLkeClusters
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 getLkeClusters(args: GetLkeClustersArgs, opts?: InvokeOptions): Promise<GetLkeClustersResult>
function getLkeClustersOutput(args: GetLkeClustersOutputArgs, opts?: InvokeOptions): Output<GetLkeClustersResult>
def get_lke_clusters(filters: Optional[Sequence[GetLkeClustersFilter]] = None,
lke_clusters: Optional[Sequence[GetLkeClustersLkeCluster]] = None,
order: Optional[str] = None,
order_by: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLkeClustersResult
def get_lke_clusters_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetLkeClustersFilterArgs]]]] = None,
lke_clusters: Optional[pulumi.Input[Sequence[pulumi.Input[GetLkeClustersLkeClusterArgs]]]] = None,
order: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLkeClustersResult]
func GetLkeClusters(ctx *Context, args *GetLkeClustersArgs, opts ...InvokeOption) (*GetLkeClustersResult, error)
func GetLkeClustersOutput(ctx *Context, args *GetLkeClustersOutputArgs, opts ...InvokeOption) GetLkeClustersResultOutput
> Note: This function is named GetLkeClusters
in the Go SDK.
public static class GetLkeClusters
{
public static Task<GetLkeClustersResult> InvokeAsync(GetLkeClustersArgs args, InvokeOptions? opts = null)
public static Output<GetLkeClustersResult> Invoke(GetLkeClustersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLkeClustersResult> getLkeClusters(GetLkeClustersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: linode:index/getLkeClusters:getLkeClusters
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Lke Clusters Filter> - Lke
Clusters List<GetLke Clusters Lke Cluster> - Order string
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- Filters
[]Get
Lke Clusters Filter - Lke
Clusters []GetLke Clusters Lke Cluster - Order string
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
List<Get
Lke Clusters Filter> - lke
Clusters List<GetLke Clusters Lke Cluster> - order String
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Get
Lke Clusters Filter[] - lke
Clusters GetLke Clusters Lke Cluster[] - order string
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Sequence[Get
Lke Clusters Filter] - lke_
clusters Sequence[GetLke Clusters Lke Cluster] - order str
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - order_
by str - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters List<Property Map>
- lke
Clusters List<Property Map> - order String
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
getLkeClusters Result
The following output properties are available:
- Id string
- The LKE Cluster's ID.
- Filters
List<Get
Lke Clusters Filter> - Lke
Clusters List<GetLke Clusters Lke Cluster> - Order string
- Order
By string
- Id string
- The LKE Cluster's ID.
- Filters
[]Get
Lke Clusters Filter - Lke
Clusters []GetLke Clusters Lke Cluster - Order string
- Order
By string
- id String
- The LKE Cluster's ID.
- filters
List<Get
Lke Clusters Filter> - lke
Clusters List<GetLke Clusters Lke Cluster> - order String
- order
By String
- id string
- The LKE Cluster's ID.
- filters
Get
Lke Clusters Filter[] - lke
Clusters GetLke Clusters Lke Cluster[] - order string
- order
By string
- id str
- The LKE Cluster's ID.
- filters
Sequence[Get
Lke Clusters Filter] - lke_
clusters Sequence[GetLke Clusters Lke Cluster] - order str
- order_
by str
- id String
- The LKE Cluster's ID.
- filters List<Property Map>
- lke
Clusters List<Property Map> - order String
- order
By String
Supporting Types
GetLkeClustersFilter
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values List<string>
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values []string
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values string[]
- A list of values for the filter to allow. These values should all be in string form.
- match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name str
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values Sequence[str]
- A list of values for the filter to allow. These values should all be in string form.
- match_
by str - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
GetLkeClustersLkeCluster
- Created string
- When this Kubernetes cluster was created.
- Id int
- The LKE Cluster's ID.
- K8s
Version string - The Kubernetes version for this Kubernetes cluster in the format of
major.minor
(e.g.1.17
). - Label string
- The unique label for the cluster.
- Region string
- This Kubernetes cluster's location.
- Status string
- The status of the cluster.
- List<string>
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- Updated string
- When this Kubernetes cluster was updated.
- Control
Plane GetLke Clusters Lke Cluster Control Plane - Defines settings for the Kubernetes Control Plane.
- Created string
- When this Kubernetes cluster was created.
- Id int
- The LKE Cluster's ID.
- K8s
Version string - The Kubernetes version for this Kubernetes cluster in the format of
major.minor
(e.g.1.17
). - Label string
- The unique label for the cluster.
- Region string
- This Kubernetes cluster's location.
- Status string
- The status of the cluster.
- []string
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- Updated string
- When this Kubernetes cluster was updated.
- Control
Plane GetLke Clusters Lke Cluster Control Plane - Defines settings for the Kubernetes Control Plane.
- created String
- When this Kubernetes cluster was created.
- id Integer
- The LKE Cluster's ID.
- k8s
Version String - The Kubernetes version for this Kubernetes cluster in the format of
major.minor
(e.g.1.17
). - label String
- The unique label for the cluster.
- region String
- This Kubernetes cluster's location.
- status String
- The status of the cluster.
- List<String>
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated String
- When this Kubernetes cluster was updated.
- control
Plane GetLke Clusters Lke Cluster Control Plane - Defines settings for the Kubernetes Control Plane.
- created string
- When this Kubernetes cluster was created.
- id number
- The LKE Cluster's ID.
- k8s
Version string - The Kubernetes version for this Kubernetes cluster in the format of
major.minor
(e.g.1.17
). - label string
- The unique label for the cluster.
- region string
- This Kubernetes cluster's location.
- status string
- The status of the cluster.
- string[]
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated string
- When this Kubernetes cluster was updated.
- control
Plane GetLke Clusters Lke Cluster Control Plane - Defines settings for the Kubernetes Control Plane.
- created str
- When this Kubernetes cluster was created.
- id int
- The LKE Cluster's ID.
- k8s_
version str - The Kubernetes version for this Kubernetes cluster in the format of
major.minor
(e.g.1.17
). - label str
- The unique label for the cluster.
- region str
- This Kubernetes cluster's location.
- status str
- The status of the cluster.
- Sequence[str]
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated str
- When this Kubernetes cluster was updated.
- control_
plane GetLke Clusters Lke Cluster Control Plane - Defines settings for the Kubernetes Control Plane.
- created String
- When this Kubernetes cluster was created.
- id Number
- The LKE Cluster's ID.
- k8s
Version String - The Kubernetes version for this Kubernetes cluster in the format of
major.minor
(e.g.1.17
). - label String
- The unique label for the cluster.
- region String
- This Kubernetes cluster's location.
- status String
- The status of the cluster.
- List<String>
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated String
- When this Kubernetes cluster was updated.
- control
Plane Property Map - Defines settings for the Kubernetes Control Plane.
GetLkeClustersLkeClusterControlPlane
- High
Availability bool - Whether High Availability is enabled for the cluster Control Plane.
- High
Availability bool - Whether High Availability is enabled for the cluster Control Plane.
- high
Availability Boolean - Whether High Availability is enabled for the cluster Control Plane.
- high
Availability boolean - Whether High Availability is enabled for the cluster Control Plane.
- high_
availability bool - Whether High Availability is enabled for the cluster Control Plane.
- high
Availability Boolean - Whether High Availability is enabled for the cluster Control Plane.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linode
Terraform Provider.