civo.getKubernetesVersion
Provides access to the available Civo Kubernetes versions, with the ability to filter the results.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Civo = Pulumi.Civo;
return await Deployment.RunAsync(() =>
{
var talos = Civo.GetKubernetesVersion.Invoke(new()
{
Filters = new[]
{
new Civo.Inputs.GetKubernetesVersionFilterInputArgs
{
Key = "type",
Values = new[]
{
"talos",
},
},
},
});
var k3s = Civo.GetKubernetesVersion.Invoke(new()
{
Filters = new[]
{
new Civo.Inputs.GetKubernetesVersionFilterInputArgs
{
Key = "type",
Values = new[]
{
"k3s",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-civo/sdk/v2/go/civo"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := civo.GetKubernetesVersion(ctx, &civo.GetKubernetesVersionArgs{
Filters: []civo.GetKubernetesVersionFilter{
{
Key: "type",
Values: []string{
"talos",
},
},
},
}, nil)
if err != nil {
return err
}
_, err = civo.GetKubernetesVersion(ctx, &civo.GetKubernetesVersionArgs{
Filters: []civo.GetKubernetesVersionFilter{
{
Key: "type",
Values: []string{
"k3s",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.civo.CivoFunctions;
import com.pulumi.civo.inputs.GetKubernetesVersionArgs;
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 talos = CivoFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
.filters(GetKubernetesVersionFilterArgs.builder()
.key("type")
.values("talos")
.build())
.build());
final var k3s = CivoFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
.filters(GetKubernetesVersionFilterArgs.builder()
.key("type")
.values("k3s")
.build())
.build());
}
}
import pulumi
import pulumi_civo as civo
talos = civo.get_kubernetes_version(filters=[civo.GetKubernetesVersionFilterArgs(
key="type",
values=["talos"],
)])
k3s = civo.get_kubernetes_version(filters=[civo.GetKubernetesVersionFilterArgs(
key="type",
values=["k3s"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";
const talos = civo.getKubernetesVersion({
filters: [{
key: "type",
values: ["talos"],
}],
});
const k3s = civo.getKubernetesVersion({
filters: [{
key: "type",
values: ["k3s"],
}],
});
variables:
talos:
fn::invoke:
Function: civo:getKubernetesVersion
Arguments:
filters:
- key: type
values:
- talos
k3s:
fn::invoke:
Function: civo:getKubernetesVersion
Arguments:
filters:
- key: type
values:
- k3s
Using getKubernetesVersion
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 getKubernetesVersion(args: GetKubernetesVersionArgs, opts?: InvokeOptions): Promise<GetKubernetesVersionResult>
function getKubernetesVersionOutput(args: GetKubernetesVersionOutputArgs, opts?: InvokeOptions): Output<GetKubernetesVersionResult>
def get_kubernetes_version(filters: Optional[Sequence[GetKubernetesVersionFilter]] = None,
sorts: Optional[Sequence[GetKubernetesVersionSort]] = None,
opts: Optional[InvokeOptions] = None) -> GetKubernetesVersionResult
def get_kubernetes_version_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetKubernetesVersionFilterArgs]]]] = None,
sorts: Optional[pulumi.Input[Sequence[pulumi.Input[GetKubernetesVersionSortArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKubernetesVersionResult]
func GetKubernetesVersion(ctx *Context, args *GetKubernetesVersionArgs, opts ...InvokeOption) (*GetKubernetesVersionResult, error)
func GetKubernetesVersionOutput(ctx *Context, args *GetKubernetesVersionOutputArgs, opts ...InvokeOption) GetKubernetesVersionResultOutput
> Note: This function is named GetKubernetesVersion
in the Go SDK.
public static class GetKubernetesVersion
{
public static Task<GetKubernetesVersionResult> InvokeAsync(GetKubernetesVersionArgs args, InvokeOptions? opts = null)
public static Output<GetKubernetesVersionResult> Invoke(GetKubernetesVersionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKubernetesVersionResult> getKubernetesVersion(GetKubernetesVersionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: civo:index/getKubernetesVersion:getKubernetesVersion
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Kubernetes Version Filter> One or more key/value pairs on which to filter results
- Sorts
List<Get
Kubernetes Version Sort> One or more key/direction pairs on which to sort results
- Filters
[]Get
Kubernetes Version Filter One or more key/value pairs on which to filter results
- Sorts
[]Get
Kubernetes Version Sort One or more key/direction pairs on which to sort results
- filters
List<Get
Kubernetes Version Filter> One or more key/value pairs on which to filter results
- sorts
List<Get
Kubernetes Version Sort> One or more key/direction pairs on which to sort results
- filters
Get
Kubernetes Version Filter[] One or more key/value pairs on which to filter results
- sorts
Get
Kubernetes Version Sort[] One or more key/direction pairs on which to sort results
- filters
Sequence[Get
Kubernetes Version Filter] One or more key/value pairs on which to filter results
- sorts
Sequence[Get
Kubernetes Version Sort] One or more key/direction pairs on which to sort results
- filters List<Property Map>
One or more key/value pairs on which to filter results
- sorts List<Property Map>
One or more key/direction pairs on which to sort results
getKubernetesVersion Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Versions
List<Get
Kubernetes Version Version> - Filters
List<Get
Kubernetes Version Filter> One or more key/value pairs on which to filter results
- Sorts
List<Get
Kubernetes Version Sort> One or more key/direction pairs on which to sort results
- Id string
The provider-assigned unique ID for this managed resource.
- Versions
[]Get
Kubernetes Version Version - Filters
[]Get
Kubernetes Version Filter One or more key/value pairs on which to filter results
- Sorts
[]Get
Kubernetes Version Sort One or more key/direction pairs on which to sort results
- id String
The provider-assigned unique ID for this managed resource.
- versions
List<Get
Kubernetes Version Version> - filters
List<Get
Kubernetes Version Filter> One or more key/value pairs on which to filter results
- sorts
List<Get
Kubernetes Version Sort> One or more key/direction pairs on which to sort results
- id string
The provider-assigned unique ID for this managed resource.
- versions
Get
Kubernetes Version Version[] - filters
Get
Kubernetes Version Filter[] One or more key/value pairs on which to filter results
- sorts
Get
Kubernetes Version Sort[] One or more key/direction pairs on which to sort results
- id str
The provider-assigned unique ID for this managed resource.
- versions
Sequence[Get
Kubernetes Version Version] - filters
Sequence[Get
Kubernetes Version Filter] One or more key/value pairs on which to filter results
- sorts
Sequence[Get
Kubernetes Version Sort] One or more key/direction pairs on which to sort results
- id String
The provider-assigned unique ID for this managed resource.
- versions List<Property Map>
- filters List<Property Map>
One or more key/value pairs on which to filter results
- sorts List<Property Map>
One or more key/direction pairs on which to sort results
Supporting Types
GetKubernetesVersionFilter
- Key string
Filter versions by this key. This may be one of
default
,label
,type
,version
.- Values List<string>
Only retrieves
versions
which keys has value that matches one of the values provided here- All bool
Set to
true
to require that a field match all of thevalues
instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevalues
are present in the list or set.- Match
By string One of
exact
(default),re
, orsubstring
. For string-typed fields, specifyre
to match by using thevalues
as regular expressions, or specifysubstring
to match by treating thevalues
as substrings to find within the string field.
- Key string
Filter versions by this key. This may be one of
default
,label
,type
,version
.- Values []string
Only retrieves
versions
which keys has value that matches one of the values provided here- All bool
Set to
true
to require that a field match all of thevalues
instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevalues
are present in the list or set.- Match
By string One of
exact
(default),re
, orsubstring
. For string-typed fields, specifyre
to match by using thevalues
as regular expressions, or specifysubstring
to match by treating thevalues
as substrings to find within the string field.
- key String
Filter versions by this key. This may be one of
default
,label
,type
,version
.- values List<String>
Only retrieves
versions
which keys has value that matches one of the values provided here- all Boolean
Set to
true
to require that a field match all of thevalues
instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevalues
are present in the list or set.- match
By String One of
exact
(default),re
, orsubstring
. For string-typed fields, specifyre
to match by using thevalues
as regular expressions, or specifysubstring
to match by treating thevalues
as substrings to find within the string field.
- key string
Filter versions by this key. This may be one of
default
,label
,type
,version
.- values string[]
Only retrieves
versions
which keys has value that matches one of the values provided here- all boolean
Set to
true
to require that a field match all of thevalues
instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevalues
are present in the list or set.- match
By string One of
exact
(default),re
, orsubstring
. For string-typed fields, specifyre
to match by using thevalues
as regular expressions, or specifysubstring
to match by treating thevalues
as substrings to find within the string field.
- key str
Filter versions by this key. This may be one of
default
,label
,type
,version
.- values Sequence[str]
Only retrieves
versions
which keys has value that matches one of the values provided here- all bool
Set to
true
to require that a field match all of thevalues
instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevalues
are present in the list or set.- match_
by str One of
exact
(default),re
, orsubstring
. For string-typed fields, specifyre
to match by using thevalues
as regular expressions, or specifysubstring
to match by treating thevalues
as substrings to find within the string field.
- key String
Filter versions by this key. This may be one of
default
,label
,type
,version
.- values List<String>
Only retrieves
versions
which keys has value that matches one of the values provided here- all Boolean
Set to
true
to require that a field match all of thevalues
instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevalues
are present in the list or set.- match
By String One of
exact
(default),re
, orsubstring
. For string-typed fields, specifyre
to match by using thevalues
as regular expressions, or specifysubstring
to match by treating thevalues
as substrings to find within the string field.
GetKubernetesVersionSort
GetKubernetesVersionVersion
Package Details
- Repository
- Civo pulumi/pulumi-civo
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
civo
Terraform Provider.