1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getCceClusterKubeconfigV3
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.getCceClusterKubeconfigV3

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Use this data source to get a cluster’s kubeconfig file from OpenTelekomCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const clusterId = config.requireObject("clusterId");
    const _this = opentelekomcloud.getCceClusterKubeconfigV3({
        clusterId: clusterId,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    cluster_id = config.require_object("clusterId")
    this = opentelekomcloud.get_cce_cluster_kubeconfig_v3(cluster_id=cluster_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		clusterId := cfg.RequireObject("clusterId")
    		_, err := opentelekomcloud.GetCceClusterKubeconfigV3(ctx, &opentelekomcloud.GetCceClusterKubeconfigV3Args{
    			ClusterId: clusterId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var clusterId = config.RequireObject<dynamic>("clusterId");
        var @this = Opentelekomcloud.GetCceClusterKubeconfigV3.Invoke(new()
        {
            ClusterId = clusterId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetCceClusterKubeconfigV3Args;
    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 config = ctx.config();
            final var clusterId = config.get("clusterId");
            final var this = OpentelekomcloudFunctions.getCceClusterKubeconfigV3(GetCceClusterKubeconfigV3Args.builder()
                .clusterId(clusterId)
                .build());
    
        }
    }
    
    configuration:
      clusterId:
        type: dynamic
    variables:
      this:
        fn::invoke:
          function: opentelekomcloud:getCceClusterKubeconfigV3
          arguments:
            clusterId: ${clusterId}
    

    Example with expiration date

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const clusterId = config.requireObject("clusterId");
    const _this = opentelekomcloud.getCceClusterKubeconfigV3({
        clusterId: opentelekomcloud_cce_cluster_v3.cluster_1.id,
        expiryDate: "2024-02-01",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    cluster_id = config.require_object("clusterId")
    this = opentelekomcloud.get_cce_cluster_kubeconfig_v3(cluster_id=opentelekomcloud_cce_cluster_v3["cluster_1"]["id"],
        expiry_date="2024-02-01")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		clusterId := cfg.RequireObject("clusterId")
    		_, err := opentelekomcloud.GetCceClusterKubeconfigV3(ctx, &opentelekomcloud.GetCceClusterKubeconfigV3Args{
    			ClusterId:  opentelekomcloud_cce_cluster_v3.Cluster_1.Id,
    			ExpiryDate: pulumi.StringRef("2024-02-01"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var clusterId = config.RequireObject<dynamic>("clusterId");
        var @this = Opentelekomcloud.GetCceClusterKubeconfigV3.Invoke(new()
        {
            ClusterId = opentelekomcloud_cce_cluster_v3.Cluster_1.Id,
            ExpiryDate = "2024-02-01",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetCceClusterKubeconfigV3Args;
    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 config = ctx.config();
            final var clusterId = config.get("clusterId");
            final var this = OpentelekomcloudFunctions.getCceClusterKubeconfigV3(GetCceClusterKubeconfigV3Args.builder()
                .clusterId(opentelekomcloud_cce_cluster_v3.cluster_1().id())
                .expiryDate("2024-02-01")
                .build());
    
        }
    }
    
    configuration:
      clusterId:
        type: dynamic
    variables:
      this:
        fn::invoke:
          function: opentelekomcloud:getCceClusterKubeconfigV3
          arguments:
            clusterId: ${opentelekomcloud_cce_cluster_v3.cluster_1.id}
            expiryDate: 2024-02-01
    

    Using getCceClusterKubeconfigV3

    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 getCceClusterKubeconfigV3(args: GetCceClusterKubeconfigV3Args, opts?: InvokeOptions): Promise<GetCceClusterKubeconfigV3Result>
    function getCceClusterKubeconfigV3Output(args: GetCceClusterKubeconfigV3OutputArgs, opts?: InvokeOptions): Output<GetCceClusterKubeconfigV3Result>
    def get_cce_cluster_kubeconfig_v3(cluster_id: Optional[str] = None,
                                      duration: Optional[float] = None,
                                      expiry_date: Optional[str] = None,
                                      id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetCceClusterKubeconfigV3Result
    def get_cce_cluster_kubeconfig_v3_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                      duration: Optional[pulumi.Input[float]] = None,
                                      expiry_date: Optional[pulumi.Input[str]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetCceClusterKubeconfigV3Result]
    func GetCceClusterKubeconfigV3(ctx *Context, args *GetCceClusterKubeconfigV3Args, opts ...InvokeOption) (*GetCceClusterKubeconfigV3Result, error)
    func GetCceClusterKubeconfigV3Output(ctx *Context, args *GetCceClusterKubeconfigV3OutputArgs, opts ...InvokeOption) GetCceClusterKubeconfigV3ResultOutput

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

    public static class GetCceClusterKubeconfigV3 
    {
        public static Task<GetCceClusterKubeconfigV3Result> InvokeAsync(GetCceClusterKubeconfigV3Args args, InvokeOptions? opts = null)
        public static Output<GetCceClusterKubeconfigV3Result> Invoke(GetCceClusterKubeconfigV3InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCceClusterKubeconfigV3Result> getCceClusterKubeconfigV3(GetCceClusterKubeconfigV3Args args, InvokeOptions options)
    public static Output<GetCceClusterKubeconfigV3Result> getCceClusterKubeconfigV3(GetCceClusterKubeconfigV3Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getCceClusterKubeconfigV3:getCceClusterKubeconfigV3
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    The Name of the cluster resource.
    Duration double
    Period during which a cluster certificate is valid, in days. A cluster certificate can be valid for 1 to 1825 days. If this parameter is set to -1, the validity period is 1825 days (about 5 years). Default vault -1.
    ExpiryDate string
    Specifies the date until which the certificate will be valid, in RFC3339 format, like 2023-02-01. Conflicts with duration attribute.
    Id string
    The ID of the cluster.
    ClusterId string
    The Name of the cluster resource.
    Duration float64
    Period during which a cluster certificate is valid, in days. A cluster certificate can be valid for 1 to 1825 days. If this parameter is set to -1, the validity period is 1825 days (about 5 years). Default vault -1.
    ExpiryDate string
    Specifies the date until which the certificate will be valid, in RFC3339 format, like 2023-02-01. Conflicts with duration attribute.
    Id string
    The ID of the cluster.
    clusterId String
    The Name of the cluster resource.
    duration Double
    Period during which a cluster certificate is valid, in days. A cluster certificate can be valid for 1 to 1825 days. If this parameter is set to -1, the validity period is 1825 days (about 5 years). Default vault -1.
    expiryDate String
    Specifies the date until which the certificate will be valid, in RFC3339 format, like 2023-02-01. Conflicts with duration attribute.
    id String
    The ID of the cluster.
    clusterId string
    The Name of the cluster resource.
    duration number
    Period during which a cluster certificate is valid, in days. A cluster certificate can be valid for 1 to 1825 days. If this parameter is set to -1, the validity period is 1825 days (about 5 years). Default vault -1.
    expiryDate string
    Specifies the date until which the certificate will be valid, in RFC3339 format, like 2023-02-01. Conflicts with duration attribute.
    id string
    The ID of the cluster.
    cluster_id str
    The Name of the cluster resource.
    duration float
    Period during which a cluster certificate is valid, in days. A cluster certificate can be valid for 1 to 1825 days. If this parameter is set to -1, the validity period is 1825 days (about 5 years). Default vault -1.
    expiry_date str
    Specifies the date until which the certificate will be valid, in RFC3339 format, like 2023-02-01. Conflicts with duration attribute.
    id str
    The ID of the cluster.
    clusterId String
    The Name of the cluster resource.
    duration Number
    Period during which a cluster certificate is valid, in days. A cluster certificate can be valid for 1 to 1825 days. If this parameter is set to -1, the validity period is 1825 days (about 5 years). Default vault -1.
    expiryDate String
    Specifies the date until which the certificate will be valid, in RFC3339 format, like 2023-02-01. Conflicts with duration attribute.
    id String
    The ID of the cluster.

    getCceClusterKubeconfigV3 Result

    The following output properties are available:

    ClusterId string
    Id string
    The ID of the cluster.
    Kubeconfig string
    The cluster's kubeconfig file contents.
    Duration double
    ExpiryDate string
    ClusterId string
    Id string
    The ID of the cluster.
    Kubeconfig string
    The cluster's kubeconfig file contents.
    Duration float64
    ExpiryDate string
    clusterId String
    id String
    The ID of the cluster.
    kubeconfig String
    The cluster's kubeconfig file contents.
    duration Double
    expiryDate String
    clusterId string
    id string
    The ID of the cluster.
    kubeconfig string
    The cluster's kubeconfig file contents.
    duration number
    expiryDate string
    cluster_id str
    id str
    The ID of the cluster.
    kubeconfig str
    The cluster's kubeconfig file contents.
    duration float
    expiry_date str
    clusterId String
    id String
    The ID of the cluster.
    kubeconfig String
    The cluster's kubeconfig file contents.
    duration Number
    expiryDate String

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud