tencentcloud.TcaplusTablegroup
Explore with Pulumi AI
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:
- Cluster
Id string - ID of the TcaplusDB cluster to which the table group belongs.
- Tablegroup
Name string - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- Tcaplus
Tablegroup stringId - ID of the resource.
- Cluster
Id string - ID of the TcaplusDB cluster to which the table group belongs.
- Tablegroup
Name string - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- Tcaplus
Tablegroup stringId - ID of the resource.
- cluster
Id String - ID of the TcaplusDB cluster to which the table group belongs.
- tablegroup
Name String - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- tcaplus
Tablegroup StringId - ID of the resource.
- cluster
Id string - ID of the TcaplusDB cluster to which the table group belongs.
- tablegroup
Name string - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- tcaplus
Tablegroup stringId - 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_ strid - ID of the resource.
- cluster
Id String - ID of the TcaplusDB cluster to which the table group belongs.
- tablegroup
Name String - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- tcaplus
Tablegroup StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TcaplusTablegroup resource produces the following output properties:
- Create
Time string - Create time of the TcaplusDB table group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Table
Count double - Number of tables.
- Total
Size double - Total storage size (MB).
- Create
Time string - Create time of the TcaplusDB table group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Table
Count float64 - Number of tables.
- Total
Size float64 - Total storage size (MB).
- create
Time String - Create time of the TcaplusDB table group.
- id String
- The provider-assigned unique ID for this managed resource.
- table
Count Double - Number of tables.
- total
Size Double - Total storage size (MB).
- create
Time string - Create time of the TcaplusDB table group.
- id string
- The provider-assigned unique ID for this managed resource.
- table
Count number - Number of tables.
- total
Size 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).
- create
Time String - Create time of the TcaplusDB table group.
- id String
- The provider-assigned unique ID for this managed resource.
- table
Count Number - Number of tables.
- total
Size 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.
- Cluster
Id string - ID of the TcaplusDB cluster to which the table group belongs.
- Create
Time string - Create time of the TcaplusDB table group.
- Table
Count double - Number of tables.
- Tablegroup
Name string - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- Tcaplus
Tablegroup stringId - ID of the resource.
- Total
Size double - Total storage size (MB).
- Cluster
Id string - ID of the TcaplusDB cluster to which the table group belongs.
- Create
Time string - Create time of the TcaplusDB table group.
- Table
Count float64 - Number of tables.
- Tablegroup
Name string - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- Tcaplus
Tablegroup stringId - ID of the resource.
- Total
Size float64 - Total storage size (MB).
- cluster
Id String - ID of the TcaplusDB cluster to which the table group belongs.
- create
Time String - Create time of the TcaplusDB table group.
- table
Count Double - Number of tables.
- tablegroup
Name String - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- tcaplus
Tablegroup StringId - ID of the resource.
- total
Size Double - Total storage size (MB).
- cluster
Id string - ID of the TcaplusDB cluster to which the table group belongs.
- create
Time string - Create time of the TcaplusDB table group.
- table
Count number - Number of tables.
- tablegroup
Name string - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- tcaplus
Tablegroup stringId - ID of the resource.
- total
Size 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_ strid - ID of the resource.
- total_
size float - Total storage size (MB).
- cluster
Id String - ID of the TcaplusDB cluster to which the table group belongs.
- create
Time String - Create time of the TcaplusDB table group.
- table
Count Number - Number of tables.
- tablegroup
Name String - Name of the TcaplusDB table group. Name length should be between 1 and 30.
- tcaplus
Tablegroup StringId - ID of the resource.
- total
Size 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.