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

tencentcloud.MariadbDedicatedclusterDbInstance

Explore with Pulumi AI

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

    Provides a resource to create a mariadb dedicatedcluster_db_instance

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const dedicatedclusterDbInstance = new tencentcloud.MariadbDedicatedclusterDbInstance("dedicatedclusterDbInstance", {
        clusterId: "dbdc-24odnuhr",
        dbVersionId: "8.0",
        goodsNum: 1,
        instanceName: "cluster-mariadb-test-1",
        memory: 2,
        storage: 10,
        subnetId: "subnet-3ku415by",
        vpcId: "vpc-ii1jfbhl",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    dedicatedcluster_db_instance = tencentcloud.MariadbDedicatedclusterDbInstance("dedicatedclusterDbInstance",
        cluster_id="dbdc-24odnuhr",
        db_version_id="8.0",
        goods_num=1,
        instance_name="cluster-mariadb-test-1",
        memory=2,
        storage=10,
        subnet_id="subnet-3ku415by",
        vpc_id="vpc-ii1jfbhl")
    
    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.NewMariadbDedicatedclusterDbInstance(ctx, "dedicatedclusterDbInstance", &tencentcloud.MariadbDedicatedclusterDbInstanceArgs{
    			ClusterId:    pulumi.String("dbdc-24odnuhr"),
    			DbVersionId:  pulumi.String("8.0"),
    			GoodsNum:     pulumi.Float64(1),
    			InstanceName: pulumi.String("cluster-mariadb-test-1"),
    			Memory:       pulumi.Float64(2),
    			Storage:      pulumi.Float64(10),
    			SubnetId:     pulumi.String("subnet-3ku415by"),
    			VpcId:        pulumi.String("vpc-ii1jfbhl"),
    		})
    		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 dedicatedclusterDbInstance = new Tencentcloud.MariadbDedicatedclusterDbInstance("dedicatedclusterDbInstance", new()
        {
            ClusterId = "dbdc-24odnuhr",
            DbVersionId = "8.0",
            GoodsNum = 1,
            InstanceName = "cluster-mariadb-test-1",
            Memory = 2,
            Storage = 10,
            SubnetId = "subnet-3ku415by",
            VpcId = "vpc-ii1jfbhl",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.MariadbDedicatedclusterDbInstance;
    import com.pulumi.tencentcloud.MariadbDedicatedclusterDbInstanceArgs;
    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 dedicatedclusterDbInstance = new MariadbDedicatedclusterDbInstance("dedicatedclusterDbInstance", MariadbDedicatedclusterDbInstanceArgs.builder()
                .clusterId("dbdc-24odnuhr")
                .dbVersionId("8.0")
                .goodsNum(1)
                .instanceName("cluster-mariadb-test-1")
                .memory(2)
                .storage(10)
                .subnetId("subnet-3ku415by")
                .vpcId("vpc-ii1jfbhl")
                .build());
    
        }
    }
    
    resources:
      dedicatedclusterDbInstance:
        type: tencentcloud:MariadbDedicatedclusterDbInstance
        properties:
          clusterId: dbdc-24odnuhr
          dbVersionId: '8.0'
          goodsNum: 1
          instanceName: cluster-mariadb-test-1
          memory: 2
          storage: 10
          subnetId: subnet-3ku415by
          vpcId: vpc-ii1jfbhl
    

    Create MariadbDedicatedclusterDbInstance Resource

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

    Constructor syntax

    new MariadbDedicatedclusterDbInstance(name: string, args: MariadbDedicatedclusterDbInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def MariadbDedicatedclusterDbInstance(resource_name: str,
                                          args: MariadbDedicatedclusterDbInstanceArgs,
                                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def MariadbDedicatedclusterDbInstance(resource_name: str,
                                          opts: Optional[ResourceOptions] = None,
                                          cluster_id: Optional[str] = None,
                                          goods_num: Optional[float] = None,
                                          memory: Optional[float] = None,
                                          storage: Optional[float] = None,
                                          db_version_id: Optional[str] = None,
                                          instance_name: Optional[str] = None,
                                          mariadb_dedicatedcluster_db_instance_id: Optional[str] = None,
                                          project_id: Optional[float] = None,
                                          subnet_id: Optional[str] = None,
                                          tags: Optional[Mapping[str, str]] = None,
                                          vip: Optional[str] = None,
                                          vpc_id: Optional[str] = None)
    func NewMariadbDedicatedclusterDbInstance(ctx *Context, name string, args MariadbDedicatedclusterDbInstanceArgs, opts ...ResourceOption) (*MariadbDedicatedclusterDbInstance, error)
    public MariadbDedicatedclusterDbInstance(string name, MariadbDedicatedclusterDbInstanceArgs args, CustomResourceOptions? opts = null)
    public MariadbDedicatedclusterDbInstance(String name, MariadbDedicatedclusterDbInstanceArgs args)
    public MariadbDedicatedclusterDbInstance(String name, MariadbDedicatedclusterDbInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MariadbDedicatedclusterDbInstance
    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 MariadbDedicatedclusterDbInstanceArgs
    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 MariadbDedicatedclusterDbInstanceArgs
    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 MariadbDedicatedclusterDbInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MariadbDedicatedclusterDbInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MariadbDedicatedclusterDbInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ClusterId string
    dedicated cluster id.
    GoodsNum double
    number of instance.
    Memory double
    instance memory.
    Storage double
    instance disk storage.
    DbVersionId string
    db engine version, default to 0.
    InstanceName string
    name of this instance.
    MariadbDedicatedclusterDbInstanceId string
    ID of the resource.
    ProjectId double
    project id.
    SubnetId string
    subnet id, it's required when vpcId is set.
    Tags Dictionary<string, string>
    Tag description list.
    Vip string
    vip.
    VpcId string
    vpc id.
    ClusterId string
    dedicated cluster id.
    GoodsNum float64
    number of instance.
    Memory float64
    instance memory.
    Storage float64
    instance disk storage.
    DbVersionId string
    db engine version, default to 0.
    InstanceName string
    name of this instance.
    MariadbDedicatedclusterDbInstanceId string
    ID of the resource.
    ProjectId float64
    project id.
    SubnetId string
    subnet id, it&#39;s required when vpcId is set.
    Tags map[string]string
    Tag description list.
    Vip string
    vip.
    VpcId string
    vpc id.
    clusterId String
    dedicated cluster id.
    goodsNum Double
    number of instance.
    memory Double
    instance memory.
    storage Double
    instance disk storage.
    dbVersionId String
    db engine version, default to 0.
    instanceName String
    name of this instance.
    mariadbDedicatedclusterDbInstanceId String
    ID of the resource.
    projectId Double
    project id.
    subnetId String
    subnet id, it&#39;s required when vpcId is set.
    tags Map<String,String>
    Tag description list.
    vip String
    vip.
    vpcId String
    vpc id.
    clusterId string
    dedicated cluster id.
    goodsNum number
    number of instance.
    memory number
    instance memory.
    storage number
    instance disk storage.
    dbVersionId string
    db engine version, default to 0.
    instanceName string
    name of this instance.
    mariadbDedicatedclusterDbInstanceId string
    ID of the resource.
    projectId number
    project id.
    subnetId string
    subnet id, it&#39;s required when vpcId is set.
    tags {[key: string]: string}
    Tag description list.
    vip string
    vip.
    vpcId string
    vpc id.
    cluster_id str
    dedicated cluster id.
    goods_num float
    number of instance.
    memory float
    instance memory.
    storage float
    instance disk storage.
    db_version_id str
    db engine version, default to 0.
    instance_name str
    name of this instance.
    mariadb_dedicatedcluster_db_instance_id str
    ID of the resource.
    project_id float
    project id.
    subnet_id str
    subnet id, it&#39;s required when vpcId is set.
    tags Mapping[str, str]
    Tag description list.
    vip str
    vip.
    vpc_id str
    vpc id.
    clusterId String
    dedicated cluster id.
    goodsNum Number
    number of instance.
    memory Number
    instance memory.
    storage Number
    instance disk storage.
    dbVersionId String
    db engine version, default to 0.
    instanceName String
    name of this instance.
    mariadbDedicatedclusterDbInstanceId String
    ID of the resource.
    projectId Number
    project id.
    subnetId String
    subnet id, it&#39;s required when vpcId is set.
    tags Map<String>
    Tag description list.
    vip String
    vip.
    vpcId String
    vpc id.

    Outputs

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

    Get an existing MariadbDedicatedclusterDbInstance 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?: MariadbDedicatedclusterDbInstanceState, opts?: CustomResourceOptions): MariadbDedicatedclusterDbInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            db_version_id: Optional[str] = None,
            goods_num: Optional[float] = None,
            instance_name: Optional[str] = None,
            mariadb_dedicatedcluster_db_instance_id: Optional[str] = None,
            memory: Optional[float] = None,
            project_id: Optional[float] = None,
            storage: Optional[float] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vip: Optional[str] = None,
            vpc_id: Optional[str] = None) -> MariadbDedicatedclusterDbInstance
    func GetMariadbDedicatedclusterDbInstance(ctx *Context, name string, id IDInput, state *MariadbDedicatedclusterDbInstanceState, opts ...ResourceOption) (*MariadbDedicatedclusterDbInstance, error)
    public static MariadbDedicatedclusterDbInstance Get(string name, Input<string> id, MariadbDedicatedclusterDbInstanceState? state, CustomResourceOptions? opts = null)
    public static MariadbDedicatedclusterDbInstance get(String name, Output<String> id, MariadbDedicatedclusterDbInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MariadbDedicatedclusterDbInstance    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
    dedicated cluster id.
    DbVersionId string
    db engine version, default to 0.
    GoodsNum double
    number of instance.
    InstanceName string
    name of this instance.
    MariadbDedicatedclusterDbInstanceId string
    ID of the resource.
    Memory double
    instance memory.
    ProjectId double
    project id.
    Storage double
    instance disk storage.
    SubnetId string
    subnet id, it&#39;s required when vpcId is set.
    Tags Dictionary<string, string>
    Tag description list.
    Vip string
    vip.
    VpcId string
    vpc id.
    ClusterId string
    dedicated cluster id.
    DbVersionId string
    db engine version, default to 0.
    GoodsNum float64
    number of instance.
    InstanceName string
    name of this instance.
    MariadbDedicatedclusterDbInstanceId string
    ID of the resource.
    Memory float64
    instance memory.
    ProjectId float64
    project id.
    Storage float64
    instance disk storage.
    SubnetId string
    subnet id, it&#39;s required when vpcId is set.
    Tags map[string]string
    Tag description list.
    Vip string
    vip.
    VpcId string
    vpc id.
    clusterId String
    dedicated cluster id.
    dbVersionId String
    db engine version, default to 0.
    goodsNum Double
    number of instance.
    instanceName String
    name of this instance.
    mariadbDedicatedclusterDbInstanceId String
    ID of the resource.
    memory Double
    instance memory.
    projectId Double
    project id.
    storage Double
    instance disk storage.
    subnetId String
    subnet id, it&#39;s required when vpcId is set.
    tags Map<String,String>
    Tag description list.
    vip String
    vip.
    vpcId String
    vpc id.
    clusterId string
    dedicated cluster id.
    dbVersionId string
    db engine version, default to 0.
    goodsNum number
    number of instance.
    instanceName string
    name of this instance.
    mariadbDedicatedclusterDbInstanceId string
    ID of the resource.
    memory number
    instance memory.
    projectId number
    project id.
    storage number
    instance disk storage.
    subnetId string
    subnet id, it&#39;s required when vpcId is set.
    tags {[key: string]: string}
    Tag description list.
    vip string
    vip.
    vpcId string
    vpc id.
    cluster_id str
    dedicated cluster id.
    db_version_id str
    db engine version, default to 0.
    goods_num float
    number of instance.
    instance_name str
    name of this instance.
    mariadb_dedicatedcluster_db_instance_id str
    ID of the resource.
    memory float
    instance memory.
    project_id float
    project id.
    storage float
    instance disk storage.
    subnet_id str
    subnet id, it&#39;s required when vpcId is set.
    tags Mapping[str, str]
    Tag description list.
    vip str
    vip.
    vpc_id str
    vpc id.
    clusterId String
    dedicated cluster id.
    dbVersionId String
    db engine version, default to 0.
    goodsNum Number
    number of instance.
    instanceName String
    name of this instance.
    mariadbDedicatedclusterDbInstanceId String
    ID of the resource.
    memory Number
    instance memory.
    projectId Number
    project id.
    storage Number
    instance disk storage.
    subnetId String
    subnet id, it&#39;s required when vpcId is set.
    tags Map<String>
    Tag description list.
    vip String
    vip.
    vpcId String
    vpc id.

    Import

    mariadb dedicatedcluster_db_instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/mariadbDedicatedclusterDbInstance:MariadbDedicatedclusterDbInstance dedicatedcluster_db_instance tdsql-050g3fmv
    

    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