tencentcloud.KubernetesAddon
Explore with Pulumi AI
Provide a resource to configure kubernetes cluster app addons.
Example Usage
Install tcr addon
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.KubernetesAddon("example", {
clusterId: "cls-k2o1ws9g",
addonName: "tcr",
rawValues: JSON.stringify({
global: {
imagePullSecretsCrs: [{
name: "tcr-h3ff76s9",
namespaces: "*",
serviceAccounts: "*",
type: "docker",
dockerUsername: "100038911322",
dockerPassword: "eyJhbGciOiJSUzI1NiIsImtpZCI6************",
dockerServer: "testcd.tencentcloudcr.com",
}],
},
}),
});
import pulumi
import json
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.KubernetesAddon("example",
cluster_id="cls-k2o1ws9g",
addon_name="tcr",
raw_values=json.dumps({
"global": {
"imagePullSecretsCrs": [{
"name": "tcr-h3ff76s9",
"namespaces": "*",
"serviceAccounts": "*",
"type": "docker",
"dockerUsername": "100038911322",
"dockerPassword": "eyJhbGciOiJSUzI1NiIsImtpZCI6************",
"dockerServer": "testcd.tencentcloudcr.com",
}],
},
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"global": map[string]interface{}{
"imagePullSecretsCrs": []map[string]interface{}{
map[string]interface{}{
"name": "tcr-h3ff76s9",
"namespaces": "*",
"serviceAccounts": "*",
"type": "docker",
"dockerUsername": "100038911322",
"dockerPassword": "eyJhbGciOiJSUzI1NiIsImtpZCI6************",
"dockerServer": "testcd.tencentcloudcr.com",
},
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = tencentcloud.NewKubernetesAddon(ctx, "example", &tencentcloud.KubernetesAddonArgs{
ClusterId: pulumi.String("cls-k2o1ws9g"),
AddonName: pulumi.String("tcr"),
RawValues: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.KubernetesAddon("example", new()
{
ClusterId = "cls-k2o1ws9g",
AddonName = "tcr",
RawValues = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["global"] = new Dictionary<string, object?>
{
["imagePullSecretsCrs"] = new[]
{
new Dictionary<string, object?>
{
["name"] = "tcr-h3ff76s9",
["namespaces"] = "*",
["serviceAccounts"] = "*",
["type"] = "docker",
["dockerUsername"] = "100038911322",
["dockerPassword"] = "eyJhbGciOiJSUzI1NiIsImtpZCI6************",
["dockerServer"] = "testcd.tencentcloudcr.com",
},
},
},
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesAddon;
import com.pulumi.tencentcloud.KubernetesAddonArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
var example = new KubernetesAddon("example", KubernetesAddonArgs.builder()
.clusterId("cls-k2o1ws9g")
.addonName("tcr")
.rawValues(serializeJson(
jsonObject(
jsonProperty("global", jsonObject(
jsonProperty("imagePullSecretsCrs", jsonArray(jsonObject(
jsonProperty("name", "tcr-h3ff76s9"),
jsonProperty("namespaces", "*"),
jsonProperty("serviceAccounts", "*"),
jsonProperty("type", "docker"),
jsonProperty("dockerUsername", "100038911322"),
jsonProperty("dockerPassword", "eyJhbGciOiJSUzI1NiIsImtpZCI6************"),
jsonProperty("dockerServer", "testcd.tencentcloudcr.com")
)))
))
)))
.build());
}
}
resources:
example:
type: tencentcloud:KubernetesAddon
properties:
clusterId: cls-k2o1ws9g
addonName: tcr
rawValues:
fn::toJSON:
global:
imagePullSecretsCrs:
- name: tcr-h3ff76s9
namespaces: '*'
serviceAccounts: '*'
type: docker
dockerUsername: '100038911322'
dockerPassword: eyJhbGciOiJSUzI1NiIsImtpZCI6************
dockerServer: testcd.tencentcloudcr.com
Create KubernetesAddon Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KubernetesAddon(name: string, args: KubernetesAddonArgs, opts?: CustomResourceOptions);
@overload
def KubernetesAddon(resource_name: str,
args: KubernetesAddonArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KubernetesAddon(resource_name: str,
opts: Optional[ResourceOptions] = None,
addon_name: Optional[str] = None,
cluster_id: Optional[str] = None,
addon_version: Optional[str] = None,
kubernetes_addon_id: Optional[str] = None,
raw_values: Optional[str] = None)
func NewKubernetesAddon(ctx *Context, name string, args KubernetesAddonArgs, opts ...ResourceOption) (*KubernetesAddon, error)
public KubernetesAddon(string name, KubernetesAddonArgs args, CustomResourceOptions? opts = null)
public KubernetesAddon(String name, KubernetesAddonArgs args)
public KubernetesAddon(String name, KubernetesAddonArgs args, CustomResourceOptions options)
type: tencentcloud:KubernetesAddon
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args KubernetesAddonArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KubernetesAddonArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KubernetesAddonArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KubernetesAddonArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KubernetesAddonArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KubernetesAddon Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The KubernetesAddon resource accepts the following input properties:
- Addon
Name string - Name of addon.
- Cluster
Id string - ID of cluster.
- Addon
Version string - Version of addon.
- Kubernetes
Addon stringId - ID of the resource.
- Raw
Values string - Params of addon, base64 encoded json format.
- Addon
Name string - Name of addon.
- Cluster
Id string - ID of cluster.
- Addon
Version string - Version of addon.
- Kubernetes
Addon stringId - ID of the resource.
- Raw
Values string - Params of addon, base64 encoded json format.
- addon
Name String - Name of addon.
- cluster
Id String - ID of cluster.
- addon
Version String - Version of addon.
- kubernetes
Addon StringId - ID of the resource.
- raw
Values String - Params of addon, base64 encoded json format.
- addon
Name string - Name of addon.
- cluster
Id string - ID of cluster.
- addon
Version string - Version of addon.
- kubernetes
Addon stringId - ID of the resource.
- raw
Values string - Params of addon, base64 encoded json format.
- addon_
name str - Name of addon.
- cluster_
id str - ID of cluster.
- addon_
version str - Version of addon.
- kubernetes_
addon_ strid - ID of the resource.
- raw_
values str - Params of addon, base64 encoded json format.
- addon
Name String - Name of addon.
- cluster
Id String - ID of cluster.
- addon
Version String - Version of addon.
- kubernetes
Addon StringId - ID of the resource.
- raw
Values String - Params of addon, base64 encoded json format.
Outputs
All input properties are implicitly available as output properties. Additionally, the KubernetesAddon resource produces the following output properties:
Look up Existing KubernetesAddon Resource
Get an existing KubernetesAddon resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: KubernetesAddonState, opts?: CustomResourceOptions): KubernetesAddon
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
addon_name: Optional[str] = None,
addon_version: Optional[str] = None,
cluster_id: Optional[str] = None,
kubernetes_addon_id: Optional[str] = None,
phase: Optional[str] = None,
raw_values: Optional[str] = None,
reason: Optional[str] = None) -> KubernetesAddon
func GetKubernetesAddon(ctx *Context, name string, id IDInput, state *KubernetesAddonState, opts ...ResourceOption) (*KubernetesAddon, error)
public static KubernetesAddon Get(string name, Input<string> id, KubernetesAddonState? state, CustomResourceOptions? opts = null)
public static KubernetesAddon get(String name, Output<String> id, KubernetesAddonState state, CustomResourceOptions options)
resources: _: type: tencentcloud:KubernetesAddon get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Addon
Name string - Name of addon.
- Addon
Version string - Version of addon.
- Cluster
Id string - ID of cluster.
- Kubernetes
Addon stringId - ID of the resource.
- Phase string
- Status of addon.
- Raw
Values string - Params of addon, base64 encoded json format.
- Reason string
- Reason of addon failed.
- Addon
Name string - Name of addon.
- Addon
Version string - Version of addon.
- Cluster
Id string - ID of cluster.
- Kubernetes
Addon stringId - ID of the resource.
- Phase string
- Status of addon.
- Raw
Values string - Params of addon, base64 encoded json format.
- Reason string
- Reason of addon failed.
- addon
Name String - Name of addon.
- addon
Version String - Version of addon.
- cluster
Id String - ID of cluster.
- kubernetes
Addon StringId - ID of the resource.
- phase String
- Status of addon.
- raw
Values String - Params of addon, base64 encoded json format.
- reason String
- Reason of addon failed.
- addon
Name string - Name of addon.
- addon
Version string - Version of addon.
- cluster
Id string - ID of cluster.
- kubernetes
Addon stringId - ID of the resource.
- phase string
- Status of addon.
- raw
Values string - Params of addon, base64 encoded json format.
- reason string
- Reason of addon failed.
- addon_
name str - Name of addon.
- addon_
version str - Version of addon.
- cluster_
id str - ID of cluster.
- kubernetes_
addon_ strid - ID of the resource.
- phase str
- Status of addon.
- raw_
values str - Params of addon, base64 encoded json format.
- reason str
- Reason of addon failed.
- addon
Name String - Name of addon.
- addon
Version String - Version of addon.
- cluster
Id String - ID of cluster.
- kubernetes
Addon StringId - ID of the resource.
- phase String
- Status of addon.
- raw
Values String - Params of addon, base64 encoded json format.
- reason String
- Reason of addon failed.
Import
kubernetes cluster app addons can be imported using the id, e.g.
$ pulumi import tencentcloud:index/kubernetesAddon:KubernetesAddon example cls-k2o1ws9g#tcr
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.