tencentcloud.DcdbHourdbInstance
Explore with Pulumi AI
Provides a resource to create a DCDB hourdb instance
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.DcdbHourdbInstance("example", {
dbVersionId: "8.0",
instanceName: "tf-example",
resourceTags: [{
tagKey: "tagKey",
tagValue: "tagValue",
}],
securityGroupId: "sg-4z20n68d",
shardCount: 2,
shardMemory: 4,
shardNodeCount: 2,
shardStorage: 50,
subnetId: "subnet-hhi88a58",
vpcId: "vpc-i5yyodl9",
zones: [
"ap-guangzhou-6",
"ap-guangzhou-7",
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.DcdbHourdbInstance("example",
db_version_id="8.0",
instance_name="tf-example",
resource_tags=[{
"tag_key": "tagKey",
"tag_value": "tagValue",
}],
security_group_id="sg-4z20n68d",
shard_count=2,
shard_memory=4,
shard_node_count=2,
shard_storage=50,
subnet_id="subnet-hhi88a58",
vpc_id="vpc-i5yyodl9",
zones=[
"ap-guangzhou-6",
"ap-guangzhou-7",
])
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.NewDcdbHourdbInstance(ctx, "example", &tencentcloud.DcdbHourdbInstanceArgs{
DbVersionId: pulumi.String("8.0"),
InstanceName: pulumi.String("tf-example"),
ResourceTags: tencentcloud.DcdbHourdbInstanceResourceTagArray{
&tencentcloud.DcdbHourdbInstanceResourceTagArgs{
TagKey: pulumi.String("tagKey"),
TagValue: pulumi.String("tagValue"),
},
},
SecurityGroupId: pulumi.String("sg-4z20n68d"),
ShardCount: pulumi.Float64(2),
ShardMemory: pulumi.Float64(4),
ShardNodeCount: pulumi.Float64(2),
ShardStorage: pulumi.Float64(50),
SubnetId: pulumi.String("subnet-hhi88a58"),
VpcId: pulumi.String("vpc-i5yyodl9"),
Zones: pulumi.StringArray{
pulumi.String("ap-guangzhou-6"),
pulumi.String("ap-guangzhou-7"),
},
})
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 example = new Tencentcloud.DcdbHourdbInstance("example", new()
{
DbVersionId = "8.0",
InstanceName = "tf-example",
ResourceTags = new[]
{
new Tencentcloud.Inputs.DcdbHourdbInstanceResourceTagArgs
{
TagKey = "tagKey",
TagValue = "tagValue",
},
},
SecurityGroupId = "sg-4z20n68d",
ShardCount = 2,
ShardMemory = 4,
ShardNodeCount = 2,
ShardStorage = 50,
SubnetId = "subnet-hhi88a58",
VpcId = "vpc-i5yyodl9",
Zones = new[]
{
"ap-guangzhou-6",
"ap-guangzhou-7",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.DcdbHourdbInstance;
import com.pulumi.tencentcloud.DcdbHourdbInstanceArgs;
import com.pulumi.tencentcloud.inputs.DcdbHourdbInstanceResourceTagArgs;
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 example = new DcdbHourdbInstance("example", DcdbHourdbInstanceArgs.builder()
.dbVersionId("8.0")
.instanceName("tf-example")
.resourceTags(DcdbHourdbInstanceResourceTagArgs.builder()
.tagKey("tagKey")
.tagValue("tagValue")
.build())
.securityGroupId("sg-4z20n68d")
.shardCount("2")
.shardMemory("4")
.shardNodeCount("2")
.shardStorage("50")
.subnetId("subnet-hhi88a58")
.vpcId("vpc-i5yyodl9")
.zones(
"ap-guangzhou-6",
"ap-guangzhou-7")
.build());
}
}
resources:
example:
type: tencentcloud:DcdbHourdbInstance
properties:
dbVersionId: '8.0'
instanceName: tf-example
resourceTags:
- tagKey: tagKey
tagValue: tagValue
securityGroupId: sg-4z20n68d
shardCount: '2'
shardMemory: '4'
shardNodeCount: '2'
shardStorage: '50'
subnetId: subnet-hhi88a58
vpcId: vpc-i5yyodl9
zones:
- ap-guangzhou-6
- ap-guangzhou-7
Create DcdbHourdbInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DcdbHourdbInstance(name: string, args: DcdbHourdbInstanceArgs, opts?: CustomResourceOptions);
@overload
def DcdbHourdbInstance(resource_name: str,
args: DcdbHourdbInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DcdbHourdbInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
shard_count: Optional[float] = None,
shard_storage: Optional[float] = None,
shard_node_count: Optional[float] = None,
shard_memory: Optional[float] = None,
extranet_access: Optional[bool] = None,
dcn_region: Optional[str] = None,
ipv6_flag: Optional[float] = None,
project_id: Optional[float] = None,
resource_tags: Optional[Sequence[DcdbHourdbInstanceResourceTagArgs]] = None,
security_group_id: Optional[str] = None,
db_version_id: Optional[str] = None,
instance_name: Optional[str] = None,
dcn_instance_id: Optional[str] = None,
dcdb_hourdb_instance_id: Optional[str] = None,
subnet_id: Optional[str] = None,
vip: Optional[str] = None,
vipv6: Optional[str] = None,
vpc_id: Optional[str] = None,
zones: Optional[Sequence[str]] = None)
func NewDcdbHourdbInstance(ctx *Context, name string, args DcdbHourdbInstanceArgs, opts ...ResourceOption) (*DcdbHourdbInstance, error)
public DcdbHourdbInstance(string name, DcdbHourdbInstanceArgs args, CustomResourceOptions? opts = null)
public DcdbHourdbInstance(String name, DcdbHourdbInstanceArgs args)
public DcdbHourdbInstance(String name, DcdbHourdbInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:DcdbHourdbInstance
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 DcdbHourdbInstanceArgs
- 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 DcdbHourdbInstanceArgs
- 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 DcdbHourdbInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DcdbHourdbInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DcdbHourdbInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DcdbHourdbInstance 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 DcdbHourdbInstance resource accepts the following input properties:
- double
- instance shard count.
- double
- memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- double
- node count for each shard. It can be obtained by querying api DescribeShardSpec.
- double
- storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Db
Version stringId - db engine version, default to Percona 5.7.17.
- Dcdb
Hourdb stringInstance Id - ID of the resource.
- Dcn
Instance stringId - DCN source instance ID.
- Dcn
Region string - DCN source region.
- Extranet
Access bool - Whether to open the extranet access.
- Instance
Name string - name of this instance.
- Ipv6Flag double
- Whether to support IPv6.
- Project
Id double - project id.
- List<Dcdb
Hourdb Instance Resource Tag> - resource tags.
- Security
Group stringId - security group id.
- Subnet
Id string - subnet id, its required when vpcId is set.
- Vip string
- The field is required to specify VIP.
- Vipv6 string
- The field is required to specify VIPv6.
- Vpc
Id string - vpc id.
- Zones List<string>
- available zone.
- float64
- instance shard count.
- float64
- memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- float64
- node count for each shard. It can be obtained by querying api DescribeShardSpec.
- float64
- storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Db
Version stringId - db engine version, default to Percona 5.7.17.
- Dcdb
Hourdb stringInstance Id - ID of the resource.
- Dcn
Instance stringId - DCN source instance ID.
- Dcn
Region string - DCN source region.
- Extranet
Access bool - Whether to open the extranet access.
- Instance
Name string - name of this instance.
- Ipv6Flag float64
- Whether to support IPv6.
- Project
Id float64 - project id.
- []Dcdb
Hourdb Instance Resource Tag Args - resource tags.
- Security
Group stringId - security group id.
- Subnet
Id string - subnet id, its required when vpcId is set.
- Vip string
- The field is required to specify VIP.
- Vipv6 string
- The field is required to specify VIPv6.
- Vpc
Id string - vpc id.
- Zones []string
- available zone.
- Double
- instance shard count.
- Double
- memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Double
- node count for each shard. It can be obtained by querying api DescribeShardSpec.
- Double
- storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- db
Version StringId - db engine version, default to Percona 5.7.17.
- dcdb
Hourdb StringInstance Id - ID of the resource.
- dcn
Instance StringId - DCN source instance ID.
- dcn
Region String - DCN source region.
- extranet
Access Boolean - Whether to open the extranet access.
- instance
Name String - name of this instance.
- ipv6Flag Double
- Whether to support IPv6.
- project
Id Double - project id.
- List<Dcdb
Hourdb Instance Resource Tag> - resource tags.
- security
Group StringId - security group id.
- subnet
Id String - subnet id, its required when vpcId is set.
- vip String
- The field is required to specify VIP.
- vipv6 String
- The field is required to specify VIPv6.
- vpc
Id String - vpc id.
- zones List<String>
- available zone.
- number
- instance shard count.
- number
- memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- number
- node count for each shard. It can be obtained by querying api DescribeShardSpec.
- number
- storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- db
Version stringId - db engine version, default to Percona 5.7.17.
- dcdb
Hourdb stringInstance Id - ID of the resource.
- dcn
Instance stringId - DCN source instance ID.
- dcn
Region string - DCN source region.
- extranet
Access boolean - Whether to open the extranet access.
- instance
Name string - name of this instance.
- ipv6Flag number
- Whether to support IPv6.
- project
Id number - project id.
- Dcdb
Hourdb Instance Resource Tag[] - resource tags.
- security
Group stringId - security group id.
- subnet
Id string - subnet id, its required when vpcId is set.
- vip string
- The field is required to specify VIP.
- vipv6 string
- The field is required to specify VIPv6.
- vpc
Id string - vpc id.
- zones string[]
- available zone.
- float
- instance shard count.
- float
- memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- float
- node count for each shard. It can be obtained by querying api DescribeShardSpec.
- float
- storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- db_
version_ strid - db engine version, default to Percona 5.7.17.
- dcdb_
hourdb_ strinstance_ id - ID of the resource.
- dcn_
instance_ strid - DCN source instance ID.
- dcn_
region str - DCN source region.
- extranet_
access bool - Whether to open the extranet access.
- instance_
name str - name of this instance.
- ipv6_
flag float - Whether to support IPv6.
- project_
id float - project id.
- Sequence[Dcdb
Hourdb Instance Resource Tag Args] - resource tags.
- security_
group_ strid - security group id.
- subnet_
id str - subnet id, its required when vpcId is set.
- vip str
- The field is required to specify VIP.
- vipv6 str
- The field is required to specify VIPv6.
- vpc_
id str - vpc id.
- zones Sequence[str]
- available zone.
- Number
- instance shard count.
- Number
- memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Number
- node count for each shard. It can be obtained by querying api DescribeShardSpec.
- Number
- storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- db
Version StringId - db engine version, default to Percona 5.7.17.
- dcdb
Hourdb StringInstance Id - ID of the resource.
- dcn
Instance StringId - DCN source instance ID.
- dcn
Region String - DCN source region.
- extranet
Access Boolean - Whether to open the extranet access.
- instance
Name String - name of this instance.
- ipv6Flag Number
- Whether to support IPv6.
- project
Id Number - project id.
- List<Property Map>
- resource tags.
- security
Group StringId - security group id.
- subnet
Id String - subnet id, its required when vpcId is set.
- vip String
- The field is required to specify VIP.
- vipv6 String
- The field is required to specify VIPv6.
- vpc
Id String - vpc id.
- zones List<String>
- available zone.
Outputs
All input properties are implicitly available as output properties. Additionally, the DcdbHourdbInstance resource produces the following output properties:
Look up Existing DcdbHourdbInstance Resource
Get an existing DcdbHourdbInstance 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?: DcdbHourdbInstanceState, opts?: CustomResourceOptions): DcdbHourdbInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
db_version_id: Optional[str] = None,
dcdb_hourdb_instance_id: Optional[str] = None,
dcn_instance_id: Optional[str] = None,
dcn_region: Optional[str] = None,
extranet_access: Optional[bool] = None,
instance_name: Optional[str] = None,
ipv6_flag: Optional[float] = None,
project_id: Optional[float] = None,
resource_tags: Optional[Sequence[DcdbHourdbInstanceResourceTagArgs]] = None,
security_group_id: Optional[str] = None,
shard_count: Optional[float] = None,
shard_memory: Optional[float] = None,
shard_node_count: Optional[float] = None,
shard_storage: Optional[float] = None,
subnet_id: Optional[str] = None,
vip: Optional[str] = None,
vipv6: Optional[str] = None,
vpc_id: Optional[str] = None,
vport: Optional[float] = None,
zones: Optional[Sequence[str]] = None) -> DcdbHourdbInstance
func GetDcdbHourdbInstance(ctx *Context, name string, id IDInput, state *DcdbHourdbInstanceState, opts ...ResourceOption) (*DcdbHourdbInstance, error)
public static DcdbHourdbInstance Get(string name, Input<string> id, DcdbHourdbInstanceState? state, CustomResourceOptions? opts = null)
public static DcdbHourdbInstance get(String name, Output<String> id, DcdbHourdbInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:DcdbHourdbInstance 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.
- Db
Version stringId - db engine version, default to Percona 5.7.17.
- Dcdb
Hourdb stringInstance Id - ID of the resource.
- Dcn
Instance stringId - DCN source instance ID.
- Dcn
Region string - DCN source region.
- Extranet
Access bool - Whether to open the extranet access.
- Instance
Name string - name of this instance.
- Ipv6Flag double
- Whether to support IPv6.
- Project
Id double - project id.
- List<Dcdb
Hourdb Instance Resource Tag> - resource tags.
- Security
Group stringId - security group id.
- Shard
Count double - instance shard count.
- Shard
Memory double - memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Shard
Node doubleCount - node count for each shard. It can be obtained by querying api DescribeShardSpec.
- Shard
Storage double - storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Subnet
Id string - subnet id, its required when vpcId is set.
- Vip string
- The field is required to specify VIP.
- Vipv6 string
- The field is required to specify VIPv6.
- Vpc
Id string - vpc id.
- Vport double
- Intranet port.
- Zones List<string>
- available zone.
- Db
Version stringId - db engine version, default to Percona 5.7.17.
- Dcdb
Hourdb stringInstance Id - ID of the resource.
- Dcn
Instance stringId - DCN source instance ID.
- Dcn
Region string - DCN source region.
- Extranet
Access bool - Whether to open the extranet access.
- Instance
Name string - name of this instance.
- Ipv6Flag float64
- Whether to support IPv6.
- Project
Id float64 - project id.
- []Dcdb
Hourdb Instance Resource Tag Args - resource tags.
- Security
Group stringId - security group id.
- Shard
Count float64 - instance shard count.
- Shard
Memory float64 - memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Shard
Node float64Count - node count for each shard. It can be obtained by querying api DescribeShardSpec.
- Shard
Storage float64 - storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- Subnet
Id string - subnet id, its required when vpcId is set.
- Vip string
- The field is required to specify VIP.
- Vipv6 string
- The field is required to specify VIPv6.
- Vpc
Id string - vpc id.
- Vport float64
- Intranet port.
- Zones []string
- available zone.
- db
Version StringId - db engine version, default to Percona 5.7.17.
- dcdb
Hourdb StringInstance Id - ID of the resource.
- dcn
Instance StringId - DCN source instance ID.
- dcn
Region String - DCN source region.
- extranet
Access Boolean - Whether to open the extranet access.
- instance
Name String - name of this instance.
- ipv6Flag Double
- Whether to support IPv6.
- project
Id Double - project id.
- List<Dcdb
Hourdb Instance Resource Tag> - resource tags.
- security
Group StringId - security group id.
- shard
Count Double - instance shard count.
- shard
Memory Double - memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- shard
Node DoubleCount - node count for each shard. It can be obtained by querying api DescribeShardSpec.
- shard
Storage Double - storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- subnet
Id String - subnet id, its required when vpcId is set.
- vip String
- The field is required to specify VIP.
- vipv6 String
- The field is required to specify VIPv6.
- vpc
Id String - vpc id.
- vport Double
- Intranet port.
- zones List<String>
- available zone.
- db
Version stringId - db engine version, default to Percona 5.7.17.
- dcdb
Hourdb stringInstance Id - ID of the resource.
- dcn
Instance stringId - DCN source instance ID.
- dcn
Region string - DCN source region.
- extranet
Access boolean - Whether to open the extranet access.
- instance
Name string - name of this instance.
- ipv6Flag number
- Whether to support IPv6.
- project
Id number - project id.
- Dcdb
Hourdb Instance Resource Tag[] - resource tags.
- security
Group stringId - security group id.
- shard
Count number - instance shard count.
- shard
Memory number - memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- shard
Node numberCount - node count for each shard. It can be obtained by querying api DescribeShardSpec.
- shard
Storage number - storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- subnet
Id string - subnet id, its required when vpcId is set.
- vip string
- The field is required to specify VIP.
- vipv6 string
- The field is required to specify VIPv6.
- vpc
Id string - vpc id.
- vport number
- Intranet port.
- zones string[]
- available zone.
- db_
version_ strid - db engine version, default to Percona 5.7.17.
- dcdb_
hourdb_ strinstance_ id - ID of the resource.
- dcn_
instance_ strid - DCN source instance ID.
- dcn_
region str - DCN source region.
- extranet_
access bool - Whether to open the extranet access.
- instance_
name str - name of this instance.
- ipv6_
flag float - Whether to support IPv6.
- project_
id float - project id.
- Sequence[Dcdb
Hourdb Instance Resource Tag Args] - resource tags.
- security_
group_ strid - security group id.
- shard_
count float - instance shard count.
- shard_
memory float - memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- shard_
node_ floatcount - node count for each shard. It can be obtained by querying api DescribeShardSpec.
- shard_
storage float - storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- subnet_
id str - subnet id, its required when vpcId is set.
- vip str
- The field is required to specify VIP.
- vipv6 str
- The field is required to specify VIPv6.
- vpc_
id str - vpc id.
- vport float
- Intranet port.
- zones Sequence[str]
- available zone.
- db
Version StringId - db engine version, default to Percona 5.7.17.
- dcdb
Hourdb StringInstance Id - ID of the resource.
- dcn
Instance StringId - DCN source instance ID.
- dcn
Region String - DCN source region.
- extranet
Access Boolean - Whether to open the extranet access.
- instance
Name String - name of this instance.
- ipv6Flag Number
- Whether to support IPv6.
- project
Id Number - project id.
- List<Property Map>
- resource tags.
- security
Group StringId - security group id.
- shard
Count Number - instance shard count.
- shard
Memory Number - memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- shard
Node NumberCount - node count for each shard. It can be obtained by querying api DescribeShardSpec.
- shard
Storage Number - storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
- subnet
Id String - subnet id, its required when vpcId is set.
- vip String
- The field is required to specify VIP.
- vipv6 String
- The field is required to specify VIPv6.
- vpc
Id String - vpc id.
- vport Number
- Intranet port.
- zones List<String>
- available zone.
Supporting Types
DcdbHourdbInstanceResourceTag, DcdbHourdbInstanceResourceTagArgs
Import
DCDB hourdb instance can be imported using the id, e.g.
$ pulumi import tencentcloud:index/dcdbHourdbInstance:DcdbHourdbInstance example tdsqlshard-nr6j5sed
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.