alicloud logo
Alibaba Cloud v3.38.0, Jun 2 23

alicloud.cs.getKubernetesAddons

Explore with Pulumi AI

This data source provides a list of available addons that the cluster can install.

NOTE: Available in 1.150.0+. NOTE: From version 1.166.0, support for returning custom configuration of kubernetes cluster addon.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.CS.GetKubernetesAddons.Invoke(new()
    {
        ClusterId = alicloud_cs_managed_kubernetes.Default[0].Id,
    });

    return new Dictionary<string, object?>
    {
        ["addons"] = @default.Apply(@default => @default.Apply(getKubernetesAddonsResult => getKubernetesAddonsResult.Addons)),
    };
});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := cs.GetKubernetesAddons(ctx, &cs.GetKubernetesAddonsArgs{
			ClusterId: alicloud_cs_managed_kubernetes.Default[0].Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("addons", _default.Addons)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesAddonsArgs;
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 default = CsFunctions.getKubernetesAddons(GetKubernetesAddonsArgs.builder()
            .clusterId(alicloud_cs_managed_kubernetes.default()[0].id())
            .build());

        ctx.export("addons", default_.addons());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.cs.get_kubernetes_addons(cluster_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
pulumi.export("addons", default.addons)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.cs.getKubernetesAddons({
    clusterId: alicloud_cs_managed_kubernetes["default"][0].id,
});
export const addons = _default.then(_default => _default.addons);
variables:
  default:
    fn::invoke:
      Function: alicloud:cs:getKubernetesAddons
      Arguments:
        clusterId: ${alicloud_cs_managed_kubernetes.default[0].id}
outputs:
  addons: ${default.addons}

Using getKubernetesAddons

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 getKubernetesAddons(args: GetKubernetesAddonsArgs, opts?: InvokeOptions): Promise<GetKubernetesAddonsResult>
function getKubernetesAddonsOutput(args: GetKubernetesAddonsOutputArgs, opts?: InvokeOptions): Output<GetKubernetesAddonsResult>
def get_kubernetes_addons(addons: Optional[Sequence[GetKubernetesAddonsAddon]] = None,
                          cluster_id: Optional[str] = None,
                          ids: Optional[Sequence[str]] = None,
                          name_regex: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetKubernetesAddonsResult
def get_kubernetes_addons_output(addons: Optional[pulumi.Input[Sequence[pulumi.Input[GetKubernetesAddonsAddonArgs]]]] = None,
                          cluster_id: Optional[pulumi.Input[str]] = None,
                          ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          name_regex: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetKubernetesAddonsResult]
func GetKubernetesAddons(ctx *Context, args *GetKubernetesAddonsArgs, opts ...InvokeOption) (*GetKubernetesAddonsResult, error)
func GetKubernetesAddonsOutput(ctx *Context, args *GetKubernetesAddonsOutputArgs, opts ...InvokeOption) GetKubernetesAddonsResultOutput

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

public static class GetKubernetesAddons 
{
    public static Task<GetKubernetesAddonsResult> InvokeAsync(GetKubernetesAddonsArgs args, InvokeOptions? opts = null)
    public static Output<GetKubernetesAddonsResult> Invoke(GetKubernetesAddonsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKubernetesAddonsResult> getKubernetesAddons(GetKubernetesAddonsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:cs/getKubernetesAddons:getKubernetesAddons
  arguments:
    # arguments dictionary

The following arguments are supported:

ClusterId string

The id of kubernetes cluster.

Addons List<Pulumi.AliCloud.CS.Inputs.GetKubernetesAddonsAddon>

A list of addons.

Ids List<string>

A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure <cluster_ud>:<addon_name>.

NameRegex string

A regex string to filter results by addon name.

ClusterId string

The id of kubernetes cluster.

Addons []GetKubernetesAddonsAddon

A list of addons.

Ids []string

A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure <cluster_ud>:<addon_name>.

NameRegex string

A regex string to filter results by addon name.

clusterId String

The id of kubernetes cluster.

addons List<GetKubernetesAddonsAddon>

A list of addons.

ids List<String>

A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure <cluster_ud>:<addon_name>.

nameRegex String

A regex string to filter results by addon name.

clusterId string

The id of kubernetes cluster.

addons GetKubernetesAddonsAddon[]

A list of addons.

ids string[]

A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure <cluster_ud>:<addon_name>.

nameRegex string

A regex string to filter results by addon name.

cluster_id str

The id of kubernetes cluster.

addons Sequence[GetKubernetesAddonsAddon]

A list of addons.

ids Sequence[str]

A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure <cluster_ud>:<addon_name>.

name_regex str

A regex string to filter results by addon name.

clusterId String

The id of kubernetes cluster.

addons List<Property Map>

A list of addons.

ids List<String>

A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure <cluster_ud>:<addon_name>.

nameRegex String

A regex string to filter results by addon name.

getKubernetesAddons Result

The following output properties are available:

ClusterId string

The id of kubernetes cluster.

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>

A list of addon names.

Addons List<Pulumi.AliCloud.CS.Outputs.GetKubernetesAddonsAddon>

A list of addons.

NameRegex string
ClusterId string

The id of kubernetes cluster.

Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string

A list of addon names.

Addons []GetKubernetesAddonsAddon

A list of addons.

NameRegex string
clusterId String

The id of kubernetes cluster.

id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>

A list of addon names.

addons List<GetKubernetesAddonsAddon>

A list of addons.

nameRegex String
clusterId string

The id of kubernetes cluster.

id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]

A list of addon names.

addons GetKubernetesAddonsAddon[]

A list of addons.

nameRegex string
cluster_id str

The id of kubernetes cluster.

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]

A list of addon names.

addons Sequence[GetKubernetesAddonsAddon]

A list of addons.

name_regex str
clusterId String

The id of kubernetes cluster.

id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>

A list of addon names.

addons List<Property Map>

A list of addons.

nameRegex String

Supporting Types

GetKubernetesAddonsAddon

CurrentConfig string

The current custom configuration of the addon. Note: Available in v1.166.0+

CurrentVersion string

The current version of addon, if this field is an empty string, it means that the addon is not installed.

Name string

The name of addon.

NextVersion string

The next version of this addon can be upgraded to.

Required bool

Whether the addon is a system addon.

CurrentConfig string

The current custom configuration of the addon. Note: Available in v1.166.0+

CurrentVersion string

The current version of addon, if this field is an empty string, it means that the addon is not installed.

Name string

The name of addon.

NextVersion string

The next version of this addon can be upgraded to.

Required bool

Whether the addon is a system addon.

currentConfig String

The current custom configuration of the addon. Note: Available in v1.166.0+

currentVersion String

The current version of addon, if this field is an empty string, it means that the addon is not installed.

name String

The name of addon.

nextVersion String

The next version of this addon can be upgraded to.

required Boolean

Whether the addon is a system addon.

currentConfig string

The current custom configuration of the addon. Note: Available in v1.166.0+

currentVersion string

The current version of addon, if this field is an empty string, it means that the addon is not installed.

name string

The name of addon.

nextVersion string

The next version of this addon can be upgraded to.

required boolean

Whether the addon is a system addon.

current_config str

The current custom configuration of the addon. Note: Available in v1.166.0+

current_version str

The current version of addon, if this field is an empty string, it means that the addon is not installed.

name str

The name of addon.

next_version str

The next version of this addon can be upgraded to.

required bool

Whether the addon is a system addon.

currentConfig String

The current custom configuration of the addon. Note: Available in v1.166.0+

currentVersion String

The current version of addon, if this field is an empty string, it means that the addon is not installed.

name String

The name of addon.

nextVersion String

The next version of this addon can be upgraded to.

required Boolean

Whether the addon is a system addon.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.