Civo

Pulumi Official
Package maintained by Pulumi
v2.2.4 published on Friday, Jul 29, 2022 by Pulumi

getKubernetesVersion

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

Example Usage

using Pulumi;
using Civo = Pulumi.Civo;

class MyStack : Stack
{
    public MyStack()
    {
        var stable = Output.Create(Civo.GetKubernetesVersion.InvokeAsync(new Civo.GetKubernetesVersionArgs
        {
            Filters = 
            {
                new Civo.Inputs.GetKubernetesVersionFilterArgs
                {
                    Key = "type",
                    Values = 
                    {
                        "stable",
                    },
                },
            },
        }));
    }

}
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, &GetKubernetesVersionArgs{
			Filters: []GetKubernetesVersionFilter{
				GetKubernetesVersionFilter{
					Key: "type",
					Values: []string{
						"stable",
					},
				},
			},
		}, 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 stable = CivoFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
            .filters(GetKubernetesVersionFilterArgs.builder()
                .key("type")
                .values("stable")
                .build())
            .build());

    }
}
import pulumi
import pulumi_civo as civo

stable = civo.get_kubernetes_version(filters=[civo.GetKubernetesVersionFilterArgs(
    key="type",
    values=["stable"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";

const stable = pulumi.output(civo.getKubernetesVersion({
    filters: [{
        key: "type",
        values: ["stable"],
    }],
}));
variables:
  stable:
    Fn::Invoke:
      Function: civo:getKubernetesVersion
      Arguments:
        filters:
          - key: type
            values:
              - stable

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:

getKubernetesVersion Result

The following output properties are available:

id String

The provider-assigned unique ID for this managed resource.

versions List<Property Map>
filters List<Property Map>
sorts List<Property Map>

Supporting Types

GetKubernetesVersionFilter

Key string
Values List<string>
All bool
MatchBy string
Key string
Values []string
All bool
MatchBy string
key String
values List<String>
all Boolean
matchBy String
key string
values string[]
all boolean
matchBy string
key str
values Sequence[str]
all bool
match_by str
key String
values List<String>
all Boolean
matchBy String

GetKubernetesVersionSort

Key string
Direction string
Key string
Direction string
key String
direction String
key string
direction string
key str
direction str
key String
direction String

GetKubernetesVersionVersion

Default bool
Label string
Type string
Version string
Default bool
Label string
Type string
Version string
default_ Boolean
label String
type String
version String
default boolean
label string
type string
version string
default bool
label str
type str
version str
default Boolean
label String
type String
version String

Package Details

Repository
https://github.com/pulumi/pulumi-civo
License
Apache-2.0
Notes

This Pulumi package is based on the civo Terraform Provider.