1. Packages
  2. Scaleway
  3. API Docs
  4. getK8sVersion
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

scaleway.getK8sVersion

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

    Gets information about a Kubernetes version. For more information, see the documentation.

    You can also use the scaleway-cli with scw k8s version list to list all available versions.

    Example Usage

    Use the latest version

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const latest = scaleway.getK8sVersion({
        name: "latest",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    latest = scaleway.get_k8s_version(name="latest")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.GetK8sVersion(ctx, &scaleway.GetK8sVersionArgs{
    			Name: "latest",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var latest = Scaleway.GetK8sVersion.Invoke(new()
        {
            Name = "latest",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetK8sVersionArgs;
    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 latest = ScalewayFunctions.getK8sVersion(GetK8sVersionArgs.builder()
                .name("latest")
                .build());
    
        }
    }
    
    variables:
      latest:
        fn::invoke:
          Function: scaleway:getK8sVersion
          Arguments:
            name: latest
    

    Use a specific version

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const byName = scaleway.getK8sVersion({
        name: "1.26.0",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    by_name = scaleway.get_k8s_version(name="1.26.0")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.GetK8sVersion(ctx, &scaleway.GetK8sVersionArgs{
    			Name: "1.26.0",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var byName = Scaleway.GetK8sVersion.Invoke(new()
        {
            Name = "1.26.0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetK8sVersionArgs;
    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 byName = ScalewayFunctions.getK8sVersion(GetK8sVersionArgs.builder()
                .name("1.26.0")
                .build());
    
        }
    }
    
    variables:
      byName:
        fn::invoke:
          Function: scaleway:getK8sVersion
          Arguments:
            name: 1.26.0
    

    Using getK8sVersion

    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 getK8sVersion(args: GetK8sVersionArgs, opts?: InvokeOptions): Promise<GetK8sVersionResult>
    function getK8sVersionOutput(args: GetK8sVersionOutputArgs, opts?: InvokeOptions): Output<GetK8sVersionResult>
    def get_k8s_version(name: Optional[str] = None,
                        region: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetK8sVersionResult
    def get_k8s_version_output(name: Optional[pulumi.Input[str]] = None,
                        region: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetK8sVersionResult]
    func GetK8sVersion(ctx *Context, args *GetK8sVersionArgs, opts ...InvokeOption) (*GetK8sVersionResult, error)
    func GetK8sVersionOutput(ctx *Context, args *GetK8sVersionOutputArgs, opts ...InvokeOption) GetK8sVersionResultOutput

    > Note: This function is named GetK8sVersion in the Go SDK.

    public static class GetK8sVersion 
    {
        public static Task<GetK8sVersionResult> InvokeAsync(GetK8sVersionArgs args, InvokeOptions? opts = null)
        public static Output<GetK8sVersionResult> Invoke(GetK8sVersionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetK8sVersionResult> getK8sVersion(GetK8sVersionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getK8sVersion:getK8sVersion
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Kubernetes version.
    Region string
    region) The region in which the version exists.
    Name string
    The name of the Kubernetes version.
    Region string
    region) The region in which the version exists.
    name String
    The name of the Kubernetes version.
    region String
    region) The region in which the version exists.
    name string
    The name of the Kubernetes version.
    region string
    region) The region in which the version exists.
    name str
    The name of the Kubernetes version.
    region str
    region) The region in which the version exists.
    name String
    The name of the Kubernetes version.
    region String
    region) The region in which the version exists.

    getK8sVersion Result

    The following output properties are available:

    AvailableCnis List<string>
    The list of supported Container Network Interface (CNI) plugins for this version.
    AvailableContainerRuntimes List<string>
    The list of supported container runtimes for this version.
    AvailableFeatureGates List<string>
    The list of supported feature gates for this version.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Region string
    AvailableCnis []string
    The list of supported Container Network Interface (CNI) plugins for this version.
    AvailableContainerRuntimes []string
    The list of supported container runtimes for this version.
    AvailableFeatureGates []string
    The list of supported feature gates for this version.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Region string
    availableCnis List<String>
    The list of supported Container Network Interface (CNI) plugins for this version.
    availableContainerRuntimes List<String>
    The list of supported container runtimes for this version.
    availableFeatureGates List<String>
    The list of supported feature gates for this version.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    region String
    availableCnis string[]
    The list of supported Container Network Interface (CNI) plugins for this version.
    availableContainerRuntimes string[]
    The list of supported container runtimes for this version.
    availableFeatureGates string[]
    The list of supported feature gates for this version.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    region string
    available_cnis Sequence[str]
    The list of supported Container Network Interface (CNI) plugins for this version.
    available_container_runtimes Sequence[str]
    The list of supported container runtimes for this version.
    available_feature_gates Sequence[str]
    The list of supported feature gates for this version.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    region str
    availableCnis List<String>
    The list of supported Container Network Interface (CNI) plugins for this version.
    availableContainerRuntimes List<String>
    The list of supported container runtimes for this version.
    availableFeatureGates List<String>
    The list of supported feature gates for this version.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    region String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse