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

tencentcloud.TdcpgCluster

Explore with Pulumi AI

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

    Provides a resource to create a tdcpg cluster.

    NOTE: This resource is still in internal testing. To experience its functions, you need to apply for a whitelist from Tencent Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const cluster = new tencentcloud.TdcpgCluster("cluster", {
        clusterName: "cluster_name",
        cpu: 1,
        dbVersion: "10.17",
        instanceCount: 1,
        masterUserPassword: "",
        memory: 1,
        payMode: "POSTPAID_BY_HOUR",
        period: 1,
        projectId: 0,
        subnetId: "subnet_id",
        vpcId: "vpc_id",
        zone: "ap-guangzhou-3",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    cluster = tencentcloud.TdcpgCluster("cluster",
        cluster_name="cluster_name",
        cpu=1,
        db_version="10.17",
        instance_count=1,
        master_user_password="",
        memory=1,
        pay_mode="POSTPAID_BY_HOUR",
        period=1,
        project_id=0,
        subnet_id="subnet_id",
        vpc_id="vpc_id",
        zone="ap-guangzhou-3")
    
    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.NewTdcpgCluster(ctx, "cluster", &tencentcloud.TdcpgClusterArgs{
    			ClusterName:        pulumi.String("cluster_name"),
    			Cpu:                pulumi.Float64(1),
    			DbVersion:          pulumi.String("10.17"),
    			InstanceCount:      pulumi.Float64(1),
    			MasterUserPassword: pulumi.String(""),
    			Memory:             pulumi.Float64(1),
    			PayMode:            pulumi.String("POSTPAID_BY_HOUR"),
    			Period:             pulumi.Float64(1),
    			ProjectId:          pulumi.Float64(0),
    			SubnetId:           pulumi.String("subnet_id"),
    			VpcId:              pulumi.String("vpc_id"),
    			Zone:               pulumi.String("ap-guangzhou-3"),
    		})
    		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 cluster = new Tencentcloud.TdcpgCluster("cluster", new()
        {
            ClusterName = "cluster_name",
            Cpu = 1,
            DbVersion = "10.17",
            InstanceCount = 1,
            MasterUserPassword = "",
            Memory = 1,
            PayMode = "POSTPAID_BY_HOUR",
            Period = 1,
            ProjectId = 0,
            SubnetId = "subnet_id",
            VpcId = "vpc_id",
            Zone = "ap-guangzhou-3",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TdcpgCluster;
    import com.pulumi.tencentcloud.TdcpgClusterArgs;
    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 cluster = new TdcpgCluster("cluster", TdcpgClusterArgs.builder()
                .clusterName("cluster_name")
                .cpu(1)
                .dbVersion("10.17")
                .instanceCount(1)
                .masterUserPassword("")
                .memory(1)
                .payMode("POSTPAID_BY_HOUR")
                .period(1)
                .projectId(0)
                .subnetId("subnet_id")
                .vpcId("vpc_id")
                .zone("ap-guangzhou-3")
                .build());
    
        }
    }
    
    resources:
      cluster:
        type: tencentcloud:TdcpgCluster
        properties:
          clusterName: cluster_name
          cpu: 1
          dbVersion: '10.17'
          instanceCount: 1
          masterUserPassword: ""
          memory: 1
          payMode: POSTPAID_BY_HOUR
          period: 1
          projectId: 0
          subnetId: subnet_id
          vpcId: vpc_id
          zone: ap-guangzhou-3
    

    Create TdcpgCluster Resource

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

    Constructor syntax

    new TdcpgCluster(name: string, args: TdcpgClusterArgs, opts?: CustomResourceOptions);
    @overload
    def TdcpgCluster(resource_name: str,
                     args: TdcpgClusterArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def TdcpgCluster(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     subnet_id: Optional[str] = None,
                     cpu: Optional[float] = None,
                     zone: Optional[str] = None,
                     vpc_id: Optional[str] = None,
                     master_user_password: Optional[str] = None,
                     memory: Optional[float] = None,
                     pay_mode: Optional[str] = None,
                     instance_count: Optional[float] = None,
                     project_id: Optional[float] = None,
                     storage: Optional[float] = None,
                     period: Optional[float] = None,
                     tdcpg_cluster_id: Optional[str] = None,
                     cluster_name: Optional[str] = None,
                     db_version: Optional[str] = None)
    func NewTdcpgCluster(ctx *Context, name string, args TdcpgClusterArgs, opts ...ResourceOption) (*TdcpgCluster, error)
    public TdcpgCluster(string name, TdcpgClusterArgs args, CustomResourceOptions? opts = null)
    public TdcpgCluster(String name, TdcpgClusterArgs args)
    public TdcpgCluster(String name, TdcpgClusterArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TdcpgCluster
    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 TdcpgClusterArgs
    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 TdcpgClusterArgs
    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 TdcpgClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TdcpgClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TdcpgClusterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Cpu double
    cpu cores.
    MasterUserPassword string
    user password.
    Memory double
    memory size.
    PayMode string
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    SubnetId string
    subnet id.
    VpcId string
    vpc id.
    Zone string
    available zone.
    ClusterName string
    cluster name.
    DbVersion string
    community version number, default to 10.17.
    InstanceCount double
    instance count.
    Period double
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    ProjectId double
    project id, default to 0, means default project.
    Storage double
    max storage, the unit is GB.
    TdcpgClusterId string
    ID of the resource.
    Cpu float64
    cpu cores.
    MasterUserPassword string
    user password.
    Memory float64
    memory size.
    PayMode string
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    SubnetId string
    subnet id.
    VpcId string
    vpc id.
    Zone string
    available zone.
    ClusterName string
    cluster name.
    DbVersion string
    community version number, default to 10.17.
    InstanceCount float64
    instance count.
    Period float64
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    ProjectId float64
    project id, default to 0, means default project.
    Storage float64
    max storage, the unit is GB.
    TdcpgClusterId string
    ID of the resource.
    cpu Double
    cpu cores.
    masterUserPassword String
    user password.
    memory Double
    memory size.
    payMode String
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    subnetId String
    subnet id.
    vpcId String
    vpc id.
    zone String
    available zone.
    clusterName String
    cluster name.
    dbVersion String
    community version number, default to 10.17.
    instanceCount Double
    instance count.
    period Double
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    projectId Double
    project id, default to 0, means default project.
    storage Double
    max storage, the unit is GB.
    tdcpgClusterId String
    ID of the resource.
    cpu number
    cpu cores.
    masterUserPassword string
    user password.
    memory number
    memory size.
    payMode string
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    subnetId string
    subnet id.
    vpcId string
    vpc id.
    zone string
    available zone.
    clusterName string
    cluster name.
    dbVersion string
    community version number, default to 10.17.
    instanceCount number
    instance count.
    period number
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    projectId number
    project id, default to 0, means default project.
    storage number
    max storage, the unit is GB.
    tdcpgClusterId string
    ID of the resource.
    cpu float
    cpu cores.
    master_user_password str
    user password.
    memory float
    memory size.
    pay_mode str
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    subnet_id str
    subnet id.
    vpc_id str
    vpc id.
    zone str
    available zone.
    cluster_name str
    cluster name.
    db_version str
    community version number, default to 10.17.
    instance_count float
    instance count.
    period float
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    project_id float
    project id, default to 0, means default project.
    storage float
    max storage, the unit is GB.
    tdcpg_cluster_id str
    ID of the resource.
    cpu Number
    cpu cores.
    masterUserPassword String
    user password.
    memory Number
    memory size.
    payMode String
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    subnetId String
    subnet id.
    vpcId String
    vpc id.
    zone String
    available zone.
    clusterName String
    cluster name.
    dbVersion String
    community version number, default to 10.17.
    instanceCount Number
    instance count.
    period Number
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    projectId Number
    project id, default to 0, means default project.
    storage Number
    max storage, the unit is GB.
    tdcpgClusterId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TdcpgCluster 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 TdcpgCluster Resource

    Get an existing TdcpgCluster 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?: TdcpgClusterState, opts?: CustomResourceOptions): TdcpgCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_name: Optional[str] = None,
            cpu: Optional[float] = None,
            db_version: Optional[str] = None,
            instance_count: Optional[float] = None,
            master_user_password: Optional[str] = None,
            memory: Optional[float] = None,
            pay_mode: Optional[str] = None,
            period: Optional[float] = None,
            project_id: Optional[float] = None,
            storage: Optional[float] = None,
            subnet_id: Optional[str] = None,
            tdcpg_cluster_id: Optional[str] = None,
            vpc_id: Optional[str] = None,
            zone: Optional[str] = None) -> TdcpgCluster
    func GetTdcpgCluster(ctx *Context, name string, id IDInput, state *TdcpgClusterState, opts ...ResourceOption) (*TdcpgCluster, error)
    public static TdcpgCluster Get(string name, Input<string> id, TdcpgClusterState? state, CustomResourceOptions? opts = null)
    public static TdcpgCluster get(String name, Output<String> id, TdcpgClusterState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TdcpgCluster    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:
    ClusterName string
    cluster name.
    Cpu double
    cpu cores.
    DbVersion string
    community version number, default to 10.17.
    InstanceCount double
    instance count.
    MasterUserPassword string
    user password.
    Memory double
    memory size.
    PayMode string
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    Period double
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    ProjectId double
    project id, default to 0, means default project.
    Storage double
    max storage, the unit is GB.
    SubnetId string
    subnet id.
    TdcpgClusterId string
    ID of the resource.
    VpcId string
    vpc id.
    Zone string
    available zone.
    ClusterName string
    cluster name.
    Cpu float64
    cpu cores.
    DbVersion string
    community version number, default to 10.17.
    InstanceCount float64
    instance count.
    MasterUserPassword string
    user password.
    Memory float64
    memory size.
    PayMode string
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    Period float64
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    ProjectId float64
    project id, default to 0, means default project.
    Storage float64
    max storage, the unit is GB.
    SubnetId string
    subnet id.
    TdcpgClusterId string
    ID of the resource.
    VpcId string
    vpc id.
    Zone string
    available zone.
    clusterName String
    cluster name.
    cpu Double
    cpu cores.
    dbVersion String
    community version number, default to 10.17.
    instanceCount Double
    instance count.
    masterUserPassword String
    user password.
    memory Double
    memory size.
    payMode String
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    period Double
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    projectId Double
    project id, default to 0, means default project.
    storage Double
    max storage, the unit is GB.
    subnetId String
    subnet id.
    tdcpgClusterId String
    ID of the resource.
    vpcId String
    vpc id.
    zone String
    available zone.
    clusterName string
    cluster name.
    cpu number
    cpu cores.
    dbVersion string
    community version number, default to 10.17.
    instanceCount number
    instance count.
    masterUserPassword string
    user password.
    memory number
    memory size.
    payMode string
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    period number
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    projectId number
    project id, default to 0, means default project.
    storage number
    max storage, the unit is GB.
    subnetId string
    subnet id.
    tdcpgClusterId string
    ID of the resource.
    vpcId string
    vpc id.
    zone string
    available zone.
    cluster_name str
    cluster name.
    cpu float
    cpu cores.
    db_version str
    community version number, default to 10.17.
    instance_count float
    instance count.
    master_user_password str
    user password.
    memory float
    memory size.
    pay_mode str
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    period float
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    project_id float
    project id, default to 0, means default project.
    storage float
    max storage, the unit is GB.
    subnet_id str
    subnet id.
    tdcpg_cluster_id str
    ID of the resource.
    vpc_id str
    vpc id.
    zone str
    available zone.
    clusterName String
    cluster name.
    cpu Number
    cpu cores.
    dbVersion String
    community version number, default to 10.17.
    instanceCount Number
    instance count.
    masterUserPassword String
    user password.
    memory Number
    memory size.
    payMode String
    pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
    period Number
    purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
    projectId Number
    project id, default to 0, means default project.
    storage Number
    max storage, the unit is GB.
    subnetId String
    subnet id.
    tdcpgClusterId String
    ID of the resource.
    vpcId String
    vpc id.
    zone String
    available zone.

    Import

    tdcpg cluster can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/tdcpgCluster:TdcpgCluster cluster cluster_id
    

    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