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

tencentcloud.MariadbHourDbInstance

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 hour_db_instance

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const basic = new tencentcloud.MariadbHourDbInstance("basic", {
        dbVersionId: "10.0",
        instanceName: "db-test-del",
        memory: 2,
        nodeCount: 2,
        storage: 10,
        subnetId: "subnet-jdi5xn22",
        tags: {
            createdBy: "terraform",
        },
        vip: "10.0.0.197",
        vpcId: "vpc-k1t8ickr",
        zones: [
            "ap-guangzhou-6",
            "ap-guangzhou-7",
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    basic = tencentcloud.MariadbHourDbInstance("basic",
        db_version_id="10.0",
        instance_name="db-test-del",
        memory=2,
        node_count=2,
        storage=10,
        subnet_id="subnet-jdi5xn22",
        tags={
            "createdBy": "terraform",
        },
        vip="10.0.0.197",
        vpc_id="vpc-k1t8ickr",
        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.NewMariadbHourDbInstance(ctx, "basic", &tencentcloud.MariadbHourDbInstanceArgs{
    			DbVersionId:  pulumi.String("10.0"),
    			InstanceName: pulumi.String("db-test-del"),
    			Memory:       pulumi.Float64(2),
    			NodeCount:    pulumi.Float64(2),
    			Storage:      pulumi.Float64(10),
    			SubnetId:     pulumi.String("subnet-jdi5xn22"),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    			Vip:   pulumi.String("10.0.0.197"),
    			VpcId: pulumi.String("vpc-k1t8ickr"),
    			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 basic = new Tencentcloud.MariadbHourDbInstance("basic", new()
        {
            DbVersionId = "10.0",
            InstanceName = "db-test-del",
            Memory = 2,
            NodeCount = 2,
            Storage = 10,
            SubnetId = "subnet-jdi5xn22",
            Tags = 
            {
                { "createdBy", "terraform" },
            },
            Vip = "10.0.0.197",
            VpcId = "vpc-k1t8ickr",
            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.MariadbHourDbInstance;
    import com.pulumi.tencentcloud.MariadbHourDbInstanceArgs;
    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 basic = new MariadbHourDbInstance("basic", MariadbHourDbInstanceArgs.builder()
                .dbVersionId("10.0")
                .instanceName("db-test-del")
                .memory(2)
                .nodeCount(2)
                .storage(10)
                .subnetId("subnet-jdi5xn22")
                .tags(Map.of("createdBy", "terraform"))
                .vip("10.0.0.197")
                .vpcId("vpc-k1t8ickr")
                .zones(            
                    "ap-guangzhou-6",
                    "ap-guangzhou-7")
                .build());
    
        }
    }
    
    resources:
      basic:
        type: tencentcloud:MariadbHourDbInstance
        properties:
          dbVersionId: '10.0'
          instanceName: db-test-del
          memory: 2
          nodeCount: 2
          storage: 10
          subnetId: subnet-jdi5xn22
          tags:
            createdBy: terraform
          vip: 10.0.0.197
          vpcId: vpc-k1t8ickr
          zones:
            - ap-guangzhou-6
            - ap-guangzhou-7
    

    Create MariadbHourDbInstance Resource

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

    Constructor syntax

    new MariadbHourDbInstance(name: string, args: MariadbHourDbInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def MariadbHourDbInstance(resource_name: str,
                              args: MariadbHourDbInstanceArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def MariadbHourDbInstance(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              memory: Optional[float] = None,
                              node_count: Optional[float] = None,
                              storage: Optional[float] = None,
                              zones: Optional[Sequence[str]] = None,
                              db_version_id: Optional[str] = None,
                              instance_name: Optional[str] = None,
                              mariadb_hour_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 NewMariadbHourDbInstance(ctx *Context, name string, args MariadbHourDbInstanceArgs, opts ...ResourceOption) (*MariadbHourDbInstance, error)
    public MariadbHourDbInstance(string name, MariadbHourDbInstanceArgs args, CustomResourceOptions? opts = null)
    public MariadbHourDbInstance(String name, MariadbHourDbInstanceArgs args)
    public MariadbHourDbInstance(String name, MariadbHourDbInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MariadbHourDbInstance
    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 MariadbHourDbInstanceArgs
    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 MariadbHourDbInstanceArgs
    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 MariadbHourDbInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MariadbHourDbInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MariadbHourDbInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Memory double
    instance memory.
    NodeCount double
    number of node for instance.
    Storage double
    instance disk storage.
    Zones List<string>
    available zone of instance.
    DbVersionId string
    db engine version, default to 10.1.9.
    InstanceName string
    name of this instance.
    MariadbHourDbInstanceId string
    ID of the resource.
    ProjectId double
    project id.
    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.
    Memory float64
    instance memory.
    NodeCount float64
    number of node for instance.
    Storage float64
    instance disk storage.
    Zones []string
    available zone of instance.
    DbVersionId string
    db engine version, default to 10.1.9.
    InstanceName string
    name of this instance.
    MariadbHourDbInstanceId 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.
    memory Double
    instance memory.
    nodeCount Double
    number of node for instance.
    storage Double
    instance disk storage.
    zones List<String>
    available zone of instance.
    dbVersionId String
    db engine version, default to 10.1.9.
    instanceName String
    name of this instance.
    mariadbHourDbInstanceId 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.
    memory number
    instance memory.
    nodeCount number
    number of node for instance.
    storage number
    instance disk storage.
    zones string[]
    available zone of instance.
    dbVersionId string
    db engine version, default to 10.1.9.
    instanceName string
    name of this instance.
    mariadbHourDbInstanceId 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.
    memory float
    instance memory.
    node_count float
    number of node for instance.
    storage float
    instance disk storage.
    zones Sequence[str]
    available zone of instance.
    db_version_id str
    db engine version, default to 10.1.9.
    instance_name str
    name of this instance.
    mariadb_hour_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.
    memory Number
    instance memory.
    nodeCount Number
    number of node for instance.
    storage Number
    instance disk storage.
    zones List<String>
    available zone of instance.
    dbVersionId String
    db engine version, default to 10.1.9.
    instanceName String
    name of this instance.
    mariadbHourDbInstanceId 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 MariadbHourDbInstance 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 MariadbHourDbInstance Resource

    Get an existing MariadbHourDbInstance 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?: MariadbHourDbInstanceState, opts?: CustomResourceOptions): MariadbHourDbInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_version_id: Optional[str] = None,
            instance_name: Optional[str] = None,
            mariadb_hour_db_instance_id: Optional[str] = None,
            memory: Optional[float] = None,
            node_count: 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,
            zones: Optional[Sequence[str]] = None) -> MariadbHourDbInstance
    func GetMariadbHourDbInstance(ctx *Context, name string, id IDInput, state *MariadbHourDbInstanceState, opts ...ResourceOption) (*MariadbHourDbInstance, error)
    public static MariadbHourDbInstance Get(string name, Input<string> id, MariadbHourDbInstanceState? state, CustomResourceOptions? opts = null)
    public static MariadbHourDbInstance get(String name, Output<String> id, MariadbHourDbInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MariadbHourDbInstance    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:
    DbVersionId string
    db engine version, default to 10.1.9.
    InstanceName string
    name of this instance.
    MariadbHourDbInstanceId string
    ID of the resource.
    Memory double
    instance memory.
    NodeCount double
    number of node for instance.
    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.
    Zones List<string>
    available zone of instance.
    DbVersionId string
    db engine version, default to 10.1.9.
    InstanceName string
    name of this instance.
    MariadbHourDbInstanceId string
    ID of the resource.
    Memory float64
    instance memory.
    NodeCount float64
    number of node for instance.
    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.
    Zones []string
    available zone of instance.
    dbVersionId String
    db engine version, default to 10.1.9.
    instanceName String
    name of this instance.
    mariadbHourDbInstanceId String
    ID of the resource.
    memory Double
    instance memory.
    nodeCount Double
    number of node for instance.
    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.
    zones List<String>
    available zone of instance.
    dbVersionId string
    db engine version, default to 10.1.9.
    instanceName string
    name of this instance.
    mariadbHourDbInstanceId string
    ID of the resource.
    memory number
    instance memory.
    nodeCount number
    number of node for instance.
    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.
    zones string[]
    available zone of instance.
    db_version_id str
    db engine version, default to 10.1.9.
    instance_name str
    name of this instance.
    mariadb_hour_db_instance_id str
    ID of the resource.
    memory float
    instance memory.
    node_count float
    number of node for instance.
    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.
    zones Sequence[str]
    available zone of instance.
    dbVersionId String
    db engine version, default to 10.1.9.
    instanceName String
    name of this instance.
    mariadbHourDbInstanceId String
    ID of the resource.
    memory Number
    instance memory.
    nodeCount Number
    number of node for instance.
    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.
    zones List<String>
    available zone of instance.

    Import

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

    $ pulumi import tencentcloud:index/mariadbHourDbInstance:MariadbHourDbInstance hour_db_instance tdsql-kjqih9nn
    

    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