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

tencentcloud.TcaplusTablegroup

Explore with Pulumi AI

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

    Use this resource to create TcaplusDB table group.

    Example Usage

    Create a tcaplusdb table group

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-3";
    const vpc = tencentcloud.getVpcSubnets({
        isDefault: true,
        availabilityZone: availabilityZone,
    });
    const vpcId = vpc.then(vpc => vpc.instanceLists?.[0]?.vpcId);
    const subnetId = vpc.then(vpc => vpc.instanceLists?.[0]?.subnetId);
    const exampleTcaplusCluster = new tencentcloud.TcaplusCluster("exampleTcaplusCluster", {
        idlType: "PROTO",
        clusterName: "tf_example_tcaplus_cluster",
        vpcId: vpcId,
        subnetId: subnetId,
        password: "your_pw_123111",
        oldPasswordExpireLast: 3600,
    });
    const exampleTcaplusTablegroup = new tencentcloud.TcaplusTablegroup("exampleTcaplusTablegroup", {
        clusterId: exampleTcaplusCluster.tcaplusClusterId,
        tablegroupName: "tf_example_group_name",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-3"
    vpc = tencentcloud.get_vpc_subnets(is_default=True,
        availability_zone=availability_zone)
    vpc_id = vpc.instance_lists[0].vpc_id
    subnet_id = vpc.instance_lists[0].subnet_id
    example_tcaplus_cluster = tencentcloud.TcaplusCluster("exampleTcaplusCluster",
        idl_type="PROTO",
        cluster_name="tf_example_tcaplus_cluster",
        vpc_id=vpc_id,
        subnet_id=subnet_id,
        password="your_pw_123111",
        old_password_expire_last=3600)
    example_tcaplus_tablegroup = tencentcloud.TcaplusTablegroup("exampleTcaplusTablegroup",
        cluster_id=example_tcaplus_cluster.tcaplus_cluster_id,
        tablegroup_name="tf_example_group_name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"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, "")
    		availabilityZone := "ap-guangzhou-3"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		vpc, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
    			IsDefault:        pulumi.BoolRef(true),
    			AvailabilityZone: pulumi.StringRef(availabilityZone),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vpcId := vpc.InstanceLists[0].VpcId
    		subnetId := vpc.InstanceLists[0].SubnetId
    		exampleTcaplusCluster, err := tencentcloud.NewTcaplusCluster(ctx, "exampleTcaplusCluster", &tencentcloud.TcaplusClusterArgs{
    			IdlType:               pulumi.String("PROTO"),
    			ClusterName:           pulumi.String("tf_example_tcaplus_cluster"),
    			VpcId:                 pulumi.String(vpcId),
    			SubnetId:              pulumi.String(subnetId),
    			Password:              pulumi.String("your_pw_123111"),
    			OldPasswordExpireLast: pulumi.Float64(3600),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewTcaplusTablegroup(ctx, "exampleTcaplusTablegroup", &tencentcloud.TcaplusTablegroupArgs{
    			ClusterId:      exampleTcaplusCluster.TcaplusClusterId,
    			TablegroupName: pulumi.String("tf_example_group_name"),
    		})
    		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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-3";
        var vpc = Tencentcloud.GetVpcSubnets.Invoke(new()
        {
            IsDefault = true,
            AvailabilityZone = availabilityZone,
        });
    
        var vpcId = vpc.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
    
        var subnetId = vpc.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
    
        var exampleTcaplusCluster = new Tencentcloud.TcaplusCluster("exampleTcaplusCluster", new()
        {
            IdlType = "PROTO",
            ClusterName = "tf_example_tcaplus_cluster",
            VpcId = vpcId,
            SubnetId = subnetId,
            Password = "your_pw_123111",
            OldPasswordExpireLast = 3600,
        });
    
        var exampleTcaplusTablegroup = new Tencentcloud.TcaplusTablegroup("exampleTcaplusTablegroup", new()
        {
            ClusterId = exampleTcaplusCluster.TcaplusClusterId,
            TablegroupName = "tf_example_group_name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetVpcSubnetsArgs;
    import com.pulumi.tencentcloud.TcaplusCluster;
    import com.pulumi.tencentcloud.TcaplusClusterArgs;
    import com.pulumi.tencentcloud.TcaplusTablegroup;
    import com.pulumi.tencentcloud.TcaplusTablegroupArgs;
    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 availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-3");
            final var vpc = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
                .isDefault(true)
                .availabilityZone(availabilityZone)
                .build());
    
            final var vpcId = vpc.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
    
            final var subnetId = vpc.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
    
            var exampleTcaplusCluster = new TcaplusCluster("exampleTcaplusCluster", TcaplusClusterArgs.builder()
                .idlType("PROTO")
                .clusterName("tf_example_tcaplus_cluster")
                .vpcId(vpcId)
                .subnetId(subnetId)
                .password("your_pw_123111")
                .oldPasswordExpireLast(3600)
                .build());
    
            var exampleTcaplusTablegroup = new TcaplusTablegroup("exampleTcaplusTablegroup", TcaplusTablegroupArgs.builder()
                .clusterId(exampleTcaplusCluster.tcaplusClusterId())
                .tablegroupName("tf_example_group_name")
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-3
    resources:
      exampleTcaplusCluster:
        type: tencentcloud:TcaplusCluster
        properties:
          idlType: PROTO
          clusterName: tf_example_tcaplus_cluster
          vpcId: ${vpcId}
          subnetId: ${subnetId}
          password: your_pw_123111
          oldPasswordExpireLast: 3600
      exampleTcaplusTablegroup:
        type: tencentcloud:TcaplusTablegroup
        properties:
          clusterId: ${exampleTcaplusCluster.tcaplusClusterId}
          tablegroupName: tf_example_group_name
    variables:
      vpcId: ${vpc.instanceLists[0].vpcId}
      subnetId: ${vpc.instanceLists[0].subnetId}
      vpc:
        fn::invoke:
          function: tencentcloud:getVpcSubnets
          arguments:
            isDefault: true
            availabilityZone: ${availabilityZone}
    

    Create TcaplusTablegroup Resource

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

    Constructor syntax

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

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

    ClusterId string
    ID of the TcaplusDB cluster to which the table group belongs.
    TablegroupName string
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    TcaplusTablegroupId string
    ID of the resource.
    ClusterId string
    ID of the TcaplusDB cluster to which the table group belongs.
    TablegroupName string
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    TcaplusTablegroupId string
    ID of the resource.
    clusterId String
    ID of the TcaplusDB cluster to which the table group belongs.
    tablegroupName String
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplusTablegroupId String
    ID of the resource.
    clusterId string
    ID of the TcaplusDB cluster to which the table group belongs.
    tablegroupName string
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplusTablegroupId string
    ID of the resource.
    cluster_id str
    ID of the TcaplusDB cluster to which the table group belongs.
    tablegroup_name str
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplus_tablegroup_id str
    ID of the resource.
    clusterId String
    ID of the TcaplusDB cluster to which the table group belongs.
    tablegroupName String
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplusTablegroupId String
    ID of the resource.

    Outputs

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

    CreateTime string
    Create time of the TcaplusDB table group.
    Id string
    The provider-assigned unique ID for this managed resource.
    TableCount double
    Number of tables.
    TotalSize double
    Total storage size (MB).
    CreateTime string
    Create time of the TcaplusDB table group.
    Id string
    The provider-assigned unique ID for this managed resource.
    TableCount float64
    Number of tables.
    TotalSize float64
    Total storage size (MB).
    createTime String
    Create time of the TcaplusDB table group.
    id String
    The provider-assigned unique ID for this managed resource.
    tableCount Double
    Number of tables.
    totalSize Double
    Total storage size (MB).
    createTime string
    Create time of the TcaplusDB table group.
    id string
    The provider-assigned unique ID for this managed resource.
    tableCount number
    Number of tables.
    totalSize number
    Total storage size (MB).
    create_time str
    Create time of the TcaplusDB table group.
    id str
    The provider-assigned unique ID for this managed resource.
    table_count float
    Number of tables.
    total_size float
    Total storage size (MB).
    createTime String
    Create time of the TcaplusDB table group.
    id String
    The provider-assigned unique ID for this managed resource.
    tableCount Number
    Number of tables.
    totalSize Number
    Total storage size (MB).

    Look up Existing TcaplusTablegroup Resource

    Get an existing TcaplusTablegroup 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?: TcaplusTablegroupState, opts?: CustomResourceOptions): TcaplusTablegroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            create_time: Optional[str] = None,
            table_count: Optional[float] = None,
            tablegroup_name: Optional[str] = None,
            tcaplus_tablegroup_id: Optional[str] = None,
            total_size: Optional[float] = None) -> TcaplusTablegroup
    func GetTcaplusTablegroup(ctx *Context, name string, id IDInput, state *TcaplusTablegroupState, opts ...ResourceOption) (*TcaplusTablegroup, error)
    public static TcaplusTablegroup Get(string name, Input<string> id, TcaplusTablegroupState? state, CustomResourceOptions? opts = null)
    public static TcaplusTablegroup get(String name, Output<String> id, TcaplusTablegroupState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TcaplusTablegroup    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:
    ClusterId string
    ID of the TcaplusDB cluster to which the table group belongs.
    CreateTime string
    Create time of the TcaplusDB table group.
    TableCount double
    Number of tables.
    TablegroupName string
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    TcaplusTablegroupId string
    ID of the resource.
    TotalSize double
    Total storage size (MB).
    ClusterId string
    ID of the TcaplusDB cluster to which the table group belongs.
    CreateTime string
    Create time of the TcaplusDB table group.
    TableCount float64
    Number of tables.
    TablegroupName string
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    TcaplusTablegroupId string
    ID of the resource.
    TotalSize float64
    Total storage size (MB).
    clusterId String
    ID of the TcaplusDB cluster to which the table group belongs.
    createTime String
    Create time of the TcaplusDB table group.
    tableCount Double
    Number of tables.
    tablegroupName String
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplusTablegroupId String
    ID of the resource.
    totalSize Double
    Total storage size (MB).
    clusterId string
    ID of the TcaplusDB cluster to which the table group belongs.
    createTime string
    Create time of the TcaplusDB table group.
    tableCount number
    Number of tables.
    tablegroupName string
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplusTablegroupId string
    ID of the resource.
    totalSize number
    Total storage size (MB).
    cluster_id str
    ID of the TcaplusDB cluster to which the table group belongs.
    create_time str
    Create time of the TcaplusDB table group.
    table_count float
    Number of tables.
    tablegroup_name str
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplus_tablegroup_id str
    ID of the resource.
    total_size float
    Total storage size (MB).
    clusterId String
    ID of the TcaplusDB cluster to which the table group belongs.
    createTime String
    Create time of the TcaplusDB table group.
    tableCount Number
    Number of tables.
    tablegroupName String
    Name of the TcaplusDB table group. Name length should be between 1 and 30.
    tcaplusTablegroupId String
    ID of the resource.
    totalSize Number
    Total storage size (MB).

    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