tencentcloud.MariadbHourDbInstance
Explore with Pulumi AI
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.
- Node
Count double - number of node for instance.
- Storage double
- instance disk storage.
- Zones List<string>
- available zone of instance.
- Db
Version stringId - db engine version, default to 10.1.9.
- Instance
Name string - name of this instance.
- Mariadb
Hour stringDb Instance Id - ID of the resource.
- Project
Id double - project id.
- Subnet
Id string - subnet id, it's required when vpcId is set.
- Dictionary<string, string>
- Tag description list.
- Vip string
- vip.
- Vpc
Id string - vpc id.
- Memory float64
- instance memory.
- Node
Count float64 - number of node for instance.
- Storage float64
- instance disk storage.
- Zones []string
- available zone of instance.
- Db
Version stringId - db engine version, default to 10.1.9.
- Instance
Name string - name of this instance.
- Mariadb
Hour stringDb Instance Id - ID of the resource.
- Project
Id float64 - project id.
- Subnet
Id string - subnet id, it's required when vpcId is set.
- map[string]string
- Tag description list.
- Vip string
- vip.
- Vpc
Id string - vpc id.
- memory Double
- instance memory.
- node
Count Double - number of node for instance.
- storage Double
- instance disk storage.
- zones List<String>
- available zone of instance.
- db
Version StringId - db engine version, default to 10.1.9.
- instance
Name String - name of this instance.
- mariadb
Hour StringDb Instance Id - ID of the resource.
- project
Id Double - project id.
- subnet
Id String - subnet id, it's required when vpcId is set.
- Map<String,String>
- Tag description list.
- vip String
- vip.
- vpc
Id String - vpc id.
- memory number
- instance memory.
- node
Count number - number of node for instance.
- storage number
- instance disk storage.
- zones string[]
- available zone of instance.
- db
Version stringId - db engine version, default to 10.1.9.
- instance
Name string - name of this instance.
- mariadb
Hour stringDb Instance Id - ID of the resource.
- project
Id number - project id.
- subnet
Id string - subnet id, it's required when vpcId is set.
- {[key: string]: string}
- Tag description list.
- vip string
- vip.
- vpc
Id 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_ strid - db engine version, default to 10.1.9.
- instance_
name str - name of this instance.
- mariadb_
hour_ strdb_ instance_ id - ID of the resource.
- project_
id float - project id.
- subnet_
id str - subnet id, it's required when vpcId is set.
- Mapping[str, str]
- Tag description list.
- vip str
- vip.
- vpc_
id str - vpc id.
- memory Number
- instance memory.
- node
Count Number - number of node for instance.
- storage Number
- instance disk storage.
- zones List<String>
- available zone of instance.
- db
Version StringId - db engine version, default to 10.1.9.
- instance
Name String - name of this instance.
- mariadb
Hour StringDb Instance Id - ID of the resource.
- project
Id Number - project id.
- subnet
Id String - subnet id, it's required when vpcId is set.
- Map<String>
- Tag description list.
- vip String
- vip.
- vpc
Id 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.
- Db
Version stringId - db engine version, default to 10.1.9.
- Instance
Name string - name of this instance.
- Mariadb
Hour stringDb Instance Id - ID of the resource.
- Memory double
- instance memory.
- Node
Count double - number of node for instance.
- Project
Id double - project id.
- Storage double
- instance disk storage.
- Subnet
Id string - subnet id, it's required when vpcId is set.
- Dictionary<string, string>
- Tag description list.
- Vip string
- vip.
- Vpc
Id string - vpc id.
- Zones List<string>
- available zone of instance.
- Db
Version stringId - db engine version, default to 10.1.9.
- Instance
Name string - name of this instance.
- Mariadb
Hour stringDb Instance Id - ID of the resource.
- Memory float64
- instance memory.
- Node
Count float64 - number of node for instance.
- Project
Id float64 - project id.
- Storage float64
- instance disk storage.
- Subnet
Id string - subnet id, it's required when vpcId is set.
- map[string]string
- Tag description list.
- Vip string
- vip.
- Vpc
Id string - vpc id.
- Zones []string
- available zone of instance.
- db
Version StringId - db engine version, default to 10.1.9.
- instance
Name String - name of this instance.
- mariadb
Hour StringDb Instance Id - ID of the resource.
- memory Double
- instance memory.
- node
Count Double - number of node for instance.
- project
Id Double - project id.
- storage Double
- instance disk storage.
- subnet
Id String - subnet id, it's required when vpcId is set.
- Map<String,String>
- Tag description list.
- vip String
- vip.
- vpc
Id String - vpc id.
- zones List<String>
- available zone of instance.
- db
Version stringId - db engine version, default to 10.1.9.
- instance
Name string - name of this instance.
- mariadb
Hour stringDb Instance Id - ID of the resource.
- memory number
- instance memory.
- node
Count number - number of node for instance.
- project
Id number - project id.
- storage number
- instance disk storage.
- subnet
Id string - subnet id, it's required when vpcId is set.
- {[key: string]: string}
- Tag description list.
- vip string
- vip.
- vpc
Id string - vpc id.
- zones string[]
- available zone of instance.
- db_
version_ strid - db engine version, default to 10.1.9.
- instance_
name str - name of this instance.
- mariadb_
hour_ strdb_ instance_ id - 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's required when vpcId is set.
- Mapping[str, str]
- Tag description list.
- vip str
- vip.
- vpc_
id str - vpc id.
- zones Sequence[str]
- available zone of instance.
- db
Version StringId - db engine version, default to 10.1.9.
- instance
Name String - name of this instance.
- mariadb
Hour StringDb Instance Id - ID of the resource.
- memory Number
- instance memory.
- node
Count Number - number of node for instance.
- project
Id Number - project id.
- storage Number
- instance disk storage.
- subnet
Id String - subnet id, it's required when vpcId is set.
- Map<String>
- Tag description list.
- vip String
- vip.
- vpc
Id 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.