tencentcloud.TcmClusterAttachment
Explore with Pulumi AI
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:
- Mesh
Id string - Mesh ID.
- Cluster
Lists List<TcmCluster Attachment Cluster List> - Cluster list.
- Tcm
Cluster stringAttachment Id - ID of the resource.
- Mesh
Id string - Mesh ID.
- Cluster
Lists []TcmCluster Attachment Cluster List Args - Cluster list.
- Tcm
Cluster stringAttachment Id - ID of the resource.
- mesh
Id String - Mesh ID.
- cluster
Lists List<TcmCluster Attachment Cluster List> - Cluster list.
- tcm
Cluster StringAttachment Id - ID of the resource.
- mesh
Id string - Mesh ID.
- cluster
Lists TcmCluster Attachment Cluster List[] - Cluster list.
- tcm
Cluster stringAttachment Id - ID of the resource.
- mesh_
id str - Mesh ID.
- cluster_
lists Sequence[TcmCluster Attachment Cluster List Args] - Cluster list.
- tcm_
cluster_ strattachment_ id - ID of the resource.
- mesh
Id String - Mesh ID.
- cluster
Lists List<Property Map> - Cluster list.
- tcm
Cluster StringAttachment Id - 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.
- Cluster
Lists List<TcmCluster Attachment Cluster List> - Cluster list.
- Mesh
Id string - Mesh ID.
- Tcm
Cluster stringAttachment Id - ID of the resource.
- Cluster
Lists []TcmCluster Attachment Cluster List Args - Cluster list.
- Mesh
Id string - Mesh ID.
- Tcm
Cluster stringAttachment Id - ID of the resource.
- cluster
Lists List<TcmCluster Attachment Cluster List> - Cluster list.
- mesh
Id String - Mesh ID.
- tcm
Cluster StringAttachment Id - ID of the resource.
- cluster
Lists TcmCluster Attachment Cluster List[] - Cluster list.
- mesh
Id string - Mesh ID.
- tcm
Cluster stringAttachment Id - ID of the resource.
- cluster_
lists Sequence[TcmCluster Attachment Cluster List Args] - Cluster list.
- mesh_
id str - Mesh ID.
- tcm_
cluster_ strattachment_ id - ID of the resource.
- cluster
Lists List<Property Map> - Cluster list.
- mesh
Id String - Mesh ID.
- tcm
Cluster StringAttachment Id - ID of the resource.
Supporting Types
TcmClusterAttachmentClusterList, TcmClusterAttachmentClusterListArgs
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.