tencentcloud.TdcpgCluster
Explore with Pulumi AI
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.
- Master
User stringPassword - user password.
- Memory double
- memory size.
- Pay
Mode string - pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
- Subnet
Id string - subnet id.
- Vpc
Id string - vpc id.
- Zone string
- available zone.
- Cluster
Name string - cluster name.
- Db
Version string - community version number, default to 10.17.
- Instance
Count double - instance count.
- Period double
- purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
- Project
Id double - project id, default to 0, means default project.
- Storage double
- max storage, the unit is GB.
- Tdcpg
Cluster stringId - ID of the resource.
- Cpu float64
- cpu cores.
- Master
User stringPassword - user password.
- Memory float64
- memory size.
- Pay
Mode string - pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
- Subnet
Id string - subnet id.
- Vpc
Id string - vpc id.
- Zone string
- available zone.
- Cluster
Name string - cluster name.
- Db
Version string - community version number, default to 10.17.
- Instance
Count float64 - instance count.
- Period float64
- purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
- Project
Id float64 - project id, default to 0, means default project.
- Storage float64
- max storage, the unit is GB.
- Tdcpg
Cluster stringId - ID of the resource.
- cpu Double
- cpu cores.
- master
User StringPassword - user password.
- memory Double
- memory size.
- pay
Mode String - pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
- subnet
Id String - subnet id.
- vpc
Id String - vpc id.
- zone String
- available zone.
- cluster
Name String - cluster name.
- db
Version String - community version number, default to 10.17.
- instance
Count Double - instance count.
- period Double
- purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
- project
Id Double - project id, default to 0, means default project.
- storage Double
- max storage, the unit is GB.
- tdcpg
Cluster StringId - ID of the resource.
- cpu number
- cpu cores.
- master
User stringPassword - user password.
- memory number
- memory size.
- pay
Mode string - pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
- subnet
Id string - subnet id.
- vpc
Id string - vpc id.
- zone string
- available zone.
- cluster
Name string - cluster name.
- db
Version string - community version number, default to 10.17.
- instance
Count number - instance count.
- period number
- purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
- project
Id number - project id, default to 0, means default project.
- storage number
- max storage, the unit is GB.
- tdcpg
Cluster stringId - ID of the resource.
- cpu float
- cpu cores.
- master_
user_ strpassword - 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_ strid - ID of the resource.
- cpu Number
- cpu cores.
- master
User StringPassword - user password.
- memory Number
- memory size.
- pay
Mode String - pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
- subnet
Id String - subnet id.
- vpc
Id String - vpc id.
- zone String
- available zone.
- cluster
Name String - cluster name.
- db
Version String - community version number, default to 10.17.
- instance
Count Number - instance count.
- period Number
- purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
- project
Id Number - project id, default to 0, means default project.
- storage Number
- max storage, the unit is GB.
- tdcpg
Cluster StringId - 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.
- Cluster
Name string - cluster name.
- Cpu double
- cpu cores.
- Db
Version string - community version number, default to 10.17.
- Instance
Count double - instance count.
- Master
User stringPassword - user password.
- Memory double
- memory size.
- Pay
Mode 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.
- Project
Id double - project id, default to 0, means default project.
- Storage double
- max storage, the unit is GB.
- Subnet
Id string - subnet id.
- Tdcpg
Cluster stringId - ID of the resource.
- Vpc
Id string - vpc id.
- Zone string
- available zone.
- Cluster
Name string - cluster name.
- Cpu float64
- cpu cores.
- Db
Version string - community version number, default to 10.17.
- Instance
Count float64 - instance count.
- Master
User stringPassword - user password.
- Memory float64
- memory size.
- Pay
Mode 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.
- Project
Id float64 - project id, default to 0, means default project.
- Storage float64
- max storage, the unit is GB.
- Subnet
Id string - subnet id.
- Tdcpg
Cluster stringId - ID of the resource.
- Vpc
Id string - vpc id.
- Zone string
- available zone.
- cluster
Name String - cluster name.
- cpu Double
- cpu cores.
- db
Version String - community version number, default to 10.17.
- instance
Count Double - instance count.
- master
User StringPassword - user password.
- memory Double
- memory size.
- pay
Mode 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.
- project
Id Double - project id, default to 0, means default project.
- storage Double
- max storage, the unit is GB.
- subnet
Id String - subnet id.
- tdcpg
Cluster StringId - ID of the resource.
- vpc
Id String - vpc id.
- zone String
- available zone.
- cluster
Name string - cluster name.
- cpu number
- cpu cores.
- db
Version string - community version number, default to 10.17.
- instance
Count number - instance count.
- master
User stringPassword - user password.
- memory number
- memory size.
- pay
Mode 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.
- project
Id number - project id, default to 0, means default project.
- storage number
- max storage, the unit is GB.
- subnet
Id string - subnet id.
- tdcpg
Cluster stringId - ID of the resource.
- vpc
Id 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_ strpassword - 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_ strid - ID of the resource.
- vpc_
id str - vpc id.
- zone str
- available zone.
- cluster
Name String - cluster name.
- cpu Number
- cpu cores.
- db
Version String - community version number, default to 10.17.
- instance
Count Number - instance count.
- master
User StringPassword - user password.
- memory Number
- memory size.
- pay
Mode 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.
- project
Id Number - project id, default to 0, means default project.
- storage Number
- max storage, the unit is GB.
- subnet
Id String - subnet id.
- tdcpg
Cluster StringId - ID of the resource.
- vpc
Id 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.