1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TcmClusterAttachment
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.TcmClusterAttachment

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a tcm cluster_attachment

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const clusterAttachment = new tencentcloud.TcmClusterAttachment("clusterAttachment", {
        clusterLists: [{
            clusterId: "cls-rc5uy6dy",
            region: "ap-guangzhou",
            role: "REMOTE",
            subnetId: "subnet-lkyb3ayc",
            type: "TKE",
            vpcId: "vpc-a1jycmbx",
        }],
        meshId: "mesh-b9q6vf9l",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    cluster_attachment = tencentcloud.TcmClusterAttachment("clusterAttachment",
        cluster_lists=[{
            "cluster_id": "cls-rc5uy6dy",
            "region": "ap-guangzhou",
            "role": "REMOTE",
            "subnet_id": "subnet-lkyb3ayc",
            "type": "TKE",
            "vpc_id": "vpc-a1jycmbx",
        }],
        mesh_id="mesh-b9q6vf9l")
    
    package main
    
    import (
    	"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 {
    		_, err := tencentcloud.NewTcmClusterAttachment(ctx, "clusterAttachment", &tencentcloud.TcmClusterAttachmentArgs{
    			ClusterLists: tencentcloud.TcmClusterAttachmentClusterListArray{
    				&tencentcloud.TcmClusterAttachmentClusterListArgs{
    					ClusterId: pulumi.String("cls-rc5uy6dy"),
    					Region:    pulumi.String("ap-guangzhou"),
    					Role:      pulumi.String("REMOTE"),
    					SubnetId:  pulumi.String("subnet-lkyb3ayc"),
    					Type:      pulumi.String("TKE"),
    					VpcId:     pulumi.String("vpc-a1jycmbx"),
    				},
    			},
    			MeshId: pulumi.String("mesh-b9q6vf9l"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var clusterAttachment = new Tencentcloud.TcmClusterAttachment("clusterAttachment", new()
        {
            ClusterLists = new[]
            {
                new Tencentcloud.Inputs.TcmClusterAttachmentClusterListArgs
                {
                    ClusterId = "cls-rc5uy6dy",
                    Region = "ap-guangzhou",
                    Role = "REMOTE",
                    SubnetId = "subnet-lkyb3ayc",
                    Type = "TKE",
                    VpcId = "vpc-a1jycmbx",
                },
            },
            MeshId = "mesh-b9q6vf9l",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TcmClusterAttachment;
    import com.pulumi.tencentcloud.TcmClusterAttachmentArgs;
    import com.pulumi.tencentcloud.inputs.TcmClusterAttachmentClusterListArgs;
    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 clusterAttachment = new TcmClusterAttachment("clusterAttachment", TcmClusterAttachmentArgs.builder()
                .clusterLists(TcmClusterAttachmentClusterListArgs.builder()
                    .clusterId("cls-rc5uy6dy")
                    .region("ap-guangzhou")
                    .role("REMOTE")
                    .subnetId("subnet-lkyb3ayc")
                    .type("TKE")
                    .vpcId("vpc-a1jycmbx")
                    .build())
                .meshId("mesh-b9q6vf9l")
                .build());
    
        }
    }
    
    resources:
      clusterAttachment:
        type: tencentcloud:TcmClusterAttachment
        properties:
          clusterLists:
            - clusterId: cls-rc5uy6dy
              region: ap-guangzhou
              role: REMOTE
              subnetId: subnet-lkyb3ayc
              type: TKE
              vpcId: vpc-a1jycmbx
          meshId: mesh-b9q6vf9l
    

    Create TcmClusterAttachment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TcmClusterAttachment(name: string, args: TcmClusterAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def TcmClusterAttachment(resource_name: str,
                             args: TcmClusterAttachmentArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def TcmClusterAttachment(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             mesh_id: Optional[str] = None,
                             cluster_lists: Optional[Sequence[TcmClusterAttachmentClusterListArgs]] = None,
                             tcm_cluster_attachment_id: Optional[str] = None)
    func NewTcmClusterAttachment(ctx *Context, name string, args TcmClusterAttachmentArgs, opts ...ResourceOption) (*TcmClusterAttachment, error)
    public TcmClusterAttachment(string name, TcmClusterAttachmentArgs args, CustomResourceOptions? opts = null)
    public TcmClusterAttachment(String name, TcmClusterAttachmentArgs args)
    public TcmClusterAttachment(String name, TcmClusterAttachmentArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TcmClusterAttachment
    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 TcmClusterAttachmentArgs
    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 TcmClusterAttachmentArgs
    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 TcmClusterAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TcmClusterAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TcmClusterAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TcmClusterAttachment 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 TcmClusterAttachment resource accepts the following input properties:

    MeshId string
    Mesh ID.
    ClusterLists List<TcmClusterAttachmentClusterList>
    Cluster list.
    TcmClusterAttachmentId string
    ID of the resource.
    MeshId string
    Mesh ID.
    ClusterLists []TcmClusterAttachmentClusterListArgs
    Cluster list.
    TcmClusterAttachmentId string
    ID of the resource.
    meshId String
    Mesh ID.
    clusterLists List<TcmClusterAttachmentClusterList>
    Cluster list.
    tcmClusterAttachmentId String
    ID of the resource.
    meshId string
    Mesh ID.
    clusterLists TcmClusterAttachmentClusterList[]
    Cluster list.
    tcmClusterAttachmentId string
    ID of the resource.
    meshId String
    Mesh ID.
    clusterLists List<Property Map>
    Cluster list.
    tcmClusterAttachmentId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TcmClusterAttachment resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TcmClusterAttachment Resource

    Get an existing TcmClusterAttachment 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?: TcmClusterAttachmentState, opts?: CustomResourceOptions): TcmClusterAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_lists: Optional[Sequence[TcmClusterAttachmentClusterListArgs]] = None,
            mesh_id: Optional[str] = None,
            tcm_cluster_attachment_id: Optional[str] = None) -> TcmClusterAttachment
    func GetTcmClusterAttachment(ctx *Context, name string, id IDInput, state *TcmClusterAttachmentState, opts ...ResourceOption) (*TcmClusterAttachment, error)
    public static TcmClusterAttachment Get(string name, Input<string> id, TcmClusterAttachmentState? state, CustomResourceOptions? opts = null)
    public static TcmClusterAttachment get(String name, Output<String> id, TcmClusterAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TcmClusterAttachment    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.
    The following state arguments are supported:
    ClusterLists List<TcmClusterAttachmentClusterList>
    Cluster list.
    MeshId string
    Mesh ID.
    TcmClusterAttachmentId string
    ID of the resource.
    ClusterLists []TcmClusterAttachmentClusterListArgs
    Cluster list.
    MeshId string
    Mesh ID.
    TcmClusterAttachmentId string
    ID of the resource.
    clusterLists List<TcmClusterAttachmentClusterList>
    Cluster list.
    meshId String
    Mesh ID.
    tcmClusterAttachmentId String
    ID of the resource.
    clusterLists TcmClusterAttachmentClusterList[]
    Cluster list.
    meshId string
    Mesh ID.
    tcmClusterAttachmentId string
    ID of the resource.
    clusterLists List<Property Map>
    Cluster list.
    meshId String
    Mesh ID.
    tcmClusterAttachmentId String
    ID of the resource.

    Supporting Types

    TcmClusterAttachmentClusterList, TcmClusterAttachmentClusterListArgs

    ClusterId string
    TKE Cluster id.
    Region string
    TKE cluster region.
    Role string
    Cluster role in mesh, REMOTE or MASTER.
    Type string
    Cluster type.
    VpcId string
    Cluster's VpcId.
    SubnetId string
    Subnet id, only needed if it's standalone mesh.
    ClusterId string
    TKE Cluster id.
    Region string
    TKE cluster region.
    Role string
    Cluster role in mesh, REMOTE or MASTER.
    Type string
    Cluster type.
    VpcId string
    Cluster's VpcId.
    SubnetId string
    Subnet id, only needed if it's standalone mesh.
    clusterId String
    TKE Cluster id.
    region String
    TKE cluster region.
    role String
    Cluster role in mesh, REMOTE or MASTER.
    type String
    Cluster type.
    vpcId String
    Cluster's VpcId.
    subnetId String
    Subnet id, only needed if it's standalone mesh.
    clusterId string
    TKE Cluster id.
    region string
    TKE cluster region.
    role string
    Cluster role in mesh, REMOTE or MASTER.
    type string
    Cluster type.
    vpcId string
    Cluster's VpcId.
    subnetId string
    Subnet id, only needed if it's standalone mesh.
    cluster_id str
    TKE Cluster id.
    region str
    TKE cluster region.
    role str
    Cluster role in mesh, REMOTE or MASTER.
    type str
    Cluster type.
    vpc_id str
    Cluster's VpcId.
    subnet_id str
    Subnet id, only needed if it's standalone mesh.
    clusterId String
    TKE Cluster id.
    region String
    TKE cluster region.
    role String
    Cluster role in mesh, REMOTE or MASTER.
    type String
    Cluster type.
    vpcId String
    Cluster's VpcId.
    subnetId String
    Subnet id, only needed if it's standalone mesh.

    Import

    tcm cluster_attachment can be imported using the mesh_id#cluster_id, e.g.

    $ pulumi import tencentcloud:index/tcmClusterAttachment:TcmClusterAttachment cluster_attachment mesh-b9q6vf9l#cls-rc5uy6dy
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack