1. Packages
  2. Civo Provider
  3. API Docs
  4. getKubernetesVersion
civo 1.1.5 published on Thursday, Feb 6, 2025 by civo

civo.getKubernetesVersion

Explore with Pulumi AI

Provides access to the available Civo Kubernetes versions, with the ability to filter the results.

Example Usage

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"],
    }],
});
Copy
import pulumi
import pulumi_civo as civo

talos = civo.get_kubernetes_version(filters=[{
    "key": "type",
    "values": ["talos"],
}])
k3s = civo.get_kubernetes_version(filters=[{
    "key": "type",
    "values": ["k3s"],
}])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/civo/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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
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",
                },
            },
        },
    });

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

    }
}
Copy
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
Copy

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>
Copy
def get_kubernetes_version(filters: Optional[Sequence[GetKubernetesVersionFilter]] = None,
                           id: Optional[str] = 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,
                           id: Optional[pulumi.Input[str]] = None,
                           sorts: Optional[pulumi.Input[Sequence[pulumi.Input[GetKubernetesVersionSortArgs]]]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetKubernetesVersionResult]
Copy
func GetKubernetesVersion(ctx *Context, args *GetKubernetesVersionArgs, opts ...InvokeOption) (*GetKubernetesVersionResult, error)
func GetKubernetesVersionOutput(ctx *Context, args *GetKubernetesVersionOutputArgs, opts ...InvokeOption) GetKubernetesVersionResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetKubernetesVersionResult> getKubernetesVersion(GetKubernetesVersionArgs args, InvokeOptions options)
public static Output<GetKubernetesVersionResult> getKubernetesVersion(GetKubernetesVersionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: civo:index/getKubernetesVersion:getKubernetesVersion
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetKubernetesVersionFilter>
One or more key/value pairs on which to filter results
Id string
The ID of this resource.
Sorts List<GetKubernetesVersionSort>
One or more key/direction pairs on which to sort results
Filters []GetKubernetesVersionFilter
One or more key/value pairs on which to filter results
Id string
The ID of this resource.
Sorts []GetKubernetesVersionSort
One or more key/direction pairs on which to sort results
filters List<GetKubernetesVersionFilter>
One or more key/value pairs on which to filter results
id String
The ID of this resource.
sorts List<GetKubernetesVersionSort>
One or more key/direction pairs on which to sort results
filters GetKubernetesVersionFilter[]
One or more key/value pairs on which to filter results
id string
The ID of this resource.
sorts GetKubernetesVersionSort[]
One or more key/direction pairs on which to sort results
filters Sequence[GetKubernetesVersionFilter]
One or more key/value pairs on which to filter results
id str
The ID of this resource.
sorts Sequence[GetKubernetesVersionSort]
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
id String
The ID of this resource.
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 ID of this resource.
Versions List<GetKubernetesVersionVersion>
Filters List<GetKubernetesVersionFilter>
One or more key/value pairs on which to filter results
Sorts List<GetKubernetesVersionSort>
One or more key/direction pairs on which to sort results
Id string
The ID of this resource.
Versions []GetKubernetesVersionVersion
Filters []GetKubernetesVersionFilter
One or more key/value pairs on which to filter results
Sorts []GetKubernetesVersionSort
One or more key/direction pairs on which to sort results
id String
The ID of this resource.
versions List<GetKubernetesVersionVersion>
filters List<GetKubernetesVersionFilter>
One or more key/value pairs on which to filter results
sorts List<GetKubernetesVersionSort>
One or more key/direction pairs on which to sort results
id string
The ID of this resource.
versions GetKubernetesVersionVersion[]
filters GetKubernetesVersionFilter[]
One or more key/value pairs on which to filter results
sorts GetKubernetesVersionSort[]
One or more key/direction pairs on which to sort results
id str
The ID of this resource.
versions Sequence[GetKubernetesVersionVersion]
filters Sequence[GetKubernetesVersionFilter]
One or more key/value pairs on which to filter results
sorts Sequence[GetKubernetesVersionSort]
One or more key/direction pairs on which to sort results
id String
The ID of this 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 This property is required. string
Filter versions by this key. This may be one of default, label, type, version.
Values This property is required. 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 the values 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 the values are present in the list or set.
MatchBy string
One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as substrings to find within the string field.
Key This property is required. string
Filter versions by this key. This may be one of default, label, type, version.
Values This property is required. []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 the values 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 the values are present in the list or set.
MatchBy string
One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as substrings to find within the string field.
key This property is required. String
Filter versions by this key. This may be one of default, label, type, version.
values This property is required. 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 the values 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 the values are present in the list or set.
matchBy String
One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as substrings to find within the string field.
key This property is required. string
Filter versions by this key. This may be one of default, label, type, version.
values This property is required. 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 the values 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 the values are present in the list or set.
matchBy string
One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as substrings to find within the string field.
key This property is required. str
Filter versions by this key. This may be one of default, label, type, version.
values This property is required. 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 the values 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 the values are present in the list or set.
match_by str
One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as substrings to find within the string field.
key This property is required. String
Filter versions by this key. This may be one of default, label, type, version.
values This property is required. 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 the values 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 the values are present in the list or set.
matchBy String
One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as substrings to find within the string field.

GetKubernetesVersionSort

Key This property is required. string
Sort versions by this key. This may be one of default, label, type, version.
Direction string
The sort direction. This may be either asc or desc.
Key This property is required. string
Sort versions by this key. This may be one of default, label, type, version.
Direction string
The sort direction. This may be either asc or desc.
key This property is required. String
Sort versions by this key. This may be one of default, label, type, version.
direction String
The sort direction. This may be either asc or desc.
key This property is required. string
Sort versions by this key. This may be one of default, label, type, version.
direction string
The sort direction. This may be either asc or desc.
key This property is required. str
Sort versions by this key. This may be one of default, label, type, version.
direction str
The sort direction. This may be either asc or desc.
key This property is required. String
Sort versions by this key. This may be one of default, label, type, version.
direction String
The sort direction. This may be either asc or desc.

GetKubernetesVersionVersion

Default This property is required. bool
Label This property is required. string
Type This property is required. string
Version This property is required. string
Default This property is required. bool
Label This property is required. string
Type This property is required. string
Version This property is required. string
default_ This property is required. Boolean
label This property is required. String
type This property is required. String
version This property is required. String
default This property is required. boolean
label This property is required. string
type This property is required. string
version This property is required. string
default This property is required. bool
label This property is required. str
type This property is required. str
version This property is required. str
default This property is required. Boolean
label This property is required. String
type This property is required. String
version This property is required. String

Package Details

Repository
Civo civo/terraform-provider-civo
License
Notes
This Pulumi package is based on the civo Terraform Provider.