tencentcloud.MysqlReadonlyInstance
Explore with Pulumi AI
Provides a mysql instance resource to create read-only database instances.
NOTE: Read-only instances can be purchased only for two-node or three-node source instances on MySQL 5.6 or above with the InnoDB engine at a specification of 1 GB memory and 50 GB disk capacity or above. NOTE: The terminate operation of read only mysql does NOT take effect immediately, maybe takes for several hours. so during that time, VPCs associated with that mysql instance can’t be terminated also.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const zones = tencentcloud.getAvailabilityZonesByProduct({
product: "cdb",
});
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
vpcId: vpc.vpcId,
cidrBlock: "10.0.0.0/16",
isMulticast: false,
});
const securityGroup = new tencentcloud.SecurityGroup("securityGroup", {description: "mysql test"});
const exampleMysqlInstance = new tencentcloud.MysqlInstance("exampleMysqlInstance", {
internetService: 1,
engineVersion: "5.7",
chargeType: "POSTPAID",
rootPassword: "PassWord123",
slaveDeployMode: 0,
availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
slaveSyncMode: 1,
instanceName: "tf-example-mysql",
memSize: 4000,
volumeSize: 200,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
intranetPort: 3306,
securityGroups: [securityGroup.securityGroupId],
tags: {
name: "test",
},
parameters: {
character_set_server: "UTF8",
max_connections: "1000",
},
});
const exampleMysqlReadonlyInstance = new tencentcloud.MysqlReadonlyInstance("exampleMysqlReadonlyInstance", {
masterInstanceId: exampleMysqlInstance.mysqlInstanceId,
instanceName: "tf-example",
memSize: 128000,
volumeSize: 255,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
intranetPort: 3306,
securityGroups: [securityGroup.securityGroupId],
tags: {
createBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
zones = tencentcloud.get_availability_zones_by_product(product="cdb")
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
availability_zone=zones.zones[0].name,
vpc_id=vpc.vpc_id,
cidr_block="10.0.0.0/16",
is_multicast=False)
security_group = tencentcloud.SecurityGroup("securityGroup", description="mysql test")
example_mysql_instance = tencentcloud.MysqlInstance("exampleMysqlInstance",
internet_service=1,
engine_version="5.7",
charge_type="POSTPAID",
root_password="PassWord123",
slave_deploy_mode=0,
availability_zone=zones.zones[0].name,
slave_sync_mode=1,
instance_name="tf-example-mysql",
mem_size=4000,
volume_size=200,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
intranet_port=3306,
security_groups=[security_group.security_group_id],
tags={
"name": "test",
},
parameters={
"character_set_server": "UTF8",
"max_connections": "1000",
})
example_mysql_readonly_instance = tencentcloud.MysqlReadonlyInstance("exampleMysqlReadonlyInstance",
master_instance_id=example_mysql_instance.mysql_instance_id,
instance_name="tf-example",
mem_size=128000,
volume_size=255,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
intranet_port=3306,
security_groups=[security_group.security_group_id],
tags={
"createBy": "terraform",
})
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 {
zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
Product: "cdb",
}, nil)
if err != nil {
return err
}
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.0.0/16"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
securityGroup, err := tencentcloud.NewSecurityGroup(ctx, "securityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("mysql test"),
})
if err != nil {
return err
}
exampleMysqlInstance, err := tencentcloud.NewMysqlInstance(ctx, "exampleMysqlInstance", &tencentcloud.MysqlInstanceArgs{
InternetService: pulumi.Float64(1),
EngineVersion: pulumi.String("5.7"),
ChargeType: pulumi.String("POSTPAID"),
RootPassword: pulumi.String("PassWord123"),
SlaveDeployMode: pulumi.Float64(0),
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
SlaveSyncMode: pulumi.Float64(1),
InstanceName: pulumi.String("tf-example-mysql"),
MemSize: pulumi.Float64(4000),
VolumeSize: pulumi.Float64(200),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
IntranetPort: pulumi.Float64(3306),
SecurityGroups: pulumi.StringArray{
securityGroup.SecurityGroupId,
},
Tags: pulumi.StringMap{
"name": pulumi.String("test"),
},
Parameters: pulumi.StringMap{
"character_set_server": pulumi.String("UTF8"),
"max_connections": pulumi.String("1000"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewMysqlReadonlyInstance(ctx, "exampleMysqlReadonlyInstance", &tencentcloud.MysqlReadonlyInstanceArgs{
MasterInstanceId: exampleMysqlInstance.MysqlInstanceId,
InstanceName: pulumi.String("tf-example"),
MemSize: pulumi.Float64(128000),
VolumeSize: pulumi.Float64(255),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
IntranetPort: pulumi.Float64(3306),
SecurityGroups: pulumi.StringArray{
securityGroup.SecurityGroupId,
},
Tags: pulumi.StringMap{
"createBy": pulumi.String("terraform"),
},
})
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 zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
{
Product = "cdb",
});
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var subnet = new Tencentcloud.Subnet("subnet", new()
{
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
VpcId = vpc.VpcId,
CidrBlock = "10.0.0.0/16",
IsMulticast = false,
});
var securityGroup = new Tencentcloud.SecurityGroup("securityGroup", new()
{
Description = "mysql test",
});
var exampleMysqlInstance = new Tencentcloud.MysqlInstance("exampleMysqlInstance", new()
{
InternetService = 1,
EngineVersion = "5.7",
ChargeType = "POSTPAID",
RootPassword = "PassWord123",
SlaveDeployMode = 0,
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
SlaveSyncMode = 1,
InstanceName = "tf-example-mysql",
MemSize = 4000,
VolumeSize = 200,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
IntranetPort = 3306,
SecurityGroups = new[]
{
securityGroup.SecurityGroupId,
},
Tags =
{
{ "name", "test" },
},
Parameters =
{
{ "character_set_server", "UTF8" },
{ "max_connections", "1000" },
},
});
var exampleMysqlReadonlyInstance = new Tencentcloud.MysqlReadonlyInstance("exampleMysqlReadonlyInstance", new()
{
MasterInstanceId = exampleMysqlInstance.MysqlInstanceId,
InstanceName = "tf-example",
MemSize = 128000,
VolumeSize = 255,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
IntranetPort = 3306,
SecurityGroups = new[]
{
securityGroup.SecurityGroupId,
},
Tags =
{
{ "createBy", "terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesByProductArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.MysqlInstance;
import com.pulumi.tencentcloud.MysqlInstanceArgs;
import com.pulumi.tencentcloud.MysqlReadonlyInstance;
import com.pulumi.tencentcloud.MysqlReadonlyInstanceArgs;
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) {
final var zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
.product("cdb")
.build());
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
.vpcId(vpc.vpcId())
.cidrBlock("10.0.0.0/16")
.isMulticast(false)
.build());
var securityGroup = new SecurityGroup("securityGroup", SecurityGroupArgs.builder()
.description("mysql test")
.build());
var exampleMysqlInstance = new MysqlInstance("exampleMysqlInstance", MysqlInstanceArgs.builder()
.internetService(1)
.engineVersion("5.7")
.chargeType("POSTPAID")
.rootPassword("PassWord123")
.slaveDeployMode(0)
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
.slaveSyncMode(1)
.instanceName("tf-example-mysql")
.memSize(4000)
.volumeSize(200)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.intranetPort(3306)
.securityGroups(securityGroup.securityGroupId())
.tags(Map.of("name", "test"))
.parameters(Map.ofEntries(
Map.entry("character_set_server", "UTF8"),
Map.entry("max_connections", "1000")
))
.build());
var exampleMysqlReadonlyInstance = new MysqlReadonlyInstance("exampleMysqlReadonlyInstance", MysqlReadonlyInstanceArgs.builder()
.masterInstanceId(exampleMysqlInstance.mysqlInstanceId())
.instanceName("tf-example")
.memSize(128000)
.volumeSize(255)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.intranetPort(3306)
.securityGroups(securityGroup.securityGroupId())
.tags(Map.of("createBy", "terraform"))
.build());
}
}
resources:
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
subnet:
type: tencentcloud:Subnet
properties:
availabilityZone: ${zones.zones[0].name}
vpcId: ${vpc.vpcId}
cidrBlock: 10.0.0.0/16
isMulticast: false
securityGroup:
type: tencentcloud:SecurityGroup
properties:
description: mysql test
exampleMysqlInstance:
type: tencentcloud:MysqlInstance
properties:
internetService: 1
engineVersion: '5.7'
chargeType: POSTPAID
rootPassword: PassWord123
slaveDeployMode: 0
availabilityZone: ${zones.zones[0].name}
slaveSyncMode: 1
instanceName: tf-example-mysql
memSize: 4000
volumeSize: 200
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
intranetPort: 3306
securityGroups:
- ${securityGroup.securityGroupId}
tags:
name: test
parameters:
character_set_server: UTF8
max_connections: '1000'
exampleMysqlReadonlyInstance:
type: tencentcloud:MysqlReadonlyInstance
properties:
masterInstanceId: ${exampleMysqlInstance.mysqlInstanceId}
instanceName: tf-example
memSize: 128000
volumeSize: 255
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
intranetPort: 3306
securityGroups:
- ${securityGroup.securityGroupId}
tags:
createBy: terraform
variables:
zones:
fn::invoke:
function: tencentcloud:getAvailabilityZonesByProduct
arguments:
product: cdb
Create MysqlReadonlyInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MysqlReadonlyInstance(name: string, args: MysqlReadonlyInstanceArgs, opts?: CustomResourceOptions);
@overload
def MysqlReadonlyInstance(resource_name: str,
args: MysqlReadonlyInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MysqlReadonlyInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_name: Optional[str] = None,
volume_size: Optional[float] = None,
mem_size: Optional[float] = None,
master_instance_id: Optional[str] = None,
param_template_id: Optional[float] = None,
prepaid_period: Optional[float] = None,
fast_upgrade: Optional[float] = None,
intranet_port: Optional[float] = None,
device_type: Optional[str] = None,
master_region: Optional[str] = None,
cpu: Optional[float] = None,
mysql_readonly_instance_id: Optional[str] = None,
auto_renew_flag: Optional[float] = None,
pay_type: Optional[float] = None,
period: Optional[float] = None,
force_delete: Optional[bool] = None,
ro_group_id: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
slave_deploy_mode: Optional[float] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
charge_type: Optional[str] = None,
vpc_id: Optional[str] = None,
wait_switch: Optional[float] = None,
zone: Optional[str] = None)
func NewMysqlReadonlyInstance(ctx *Context, name string, args MysqlReadonlyInstanceArgs, opts ...ResourceOption) (*MysqlReadonlyInstance, error)
public MysqlReadonlyInstance(string name, MysqlReadonlyInstanceArgs args, CustomResourceOptions? opts = null)
public MysqlReadonlyInstance(String name, MysqlReadonlyInstanceArgs args)
public MysqlReadonlyInstance(String name, MysqlReadonlyInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:MysqlReadonlyInstance
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 MysqlReadonlyInstanceArgs
- 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 MysqlReadonlyInstanceArgs
- 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 MysqlReadonlyInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MysqlReadonlyInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MysqlReadonlyInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MysqlReadonlyInstance 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 MysqlReadonlyInstance resource accepts the following input properties:
- Instance
Name string - The name of a mysql instance.
- Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Mem
Size double - Memory size (in MB).
- Volume
Size double - Disk size (in GB).
- Auto
Renew doubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu double
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- Fast
Upgrade double - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - Intranet
Port double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Master
Region string - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- Mysql
Readonly stringInstance Id - ID of the resource.
- Param
Template doubleId - Specify parameter template id.
- Pay
Type double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period double - Period of instance. NOTES: Only supported prepaid instance.
- Ro
Group stringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- Security
Groups List<string> - Security groups to use.
- Slave
Deploy doubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - Dictionary<string, string>
- Instance tags.
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- Wait
Switch double - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - Zone string
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- Instance
Name string - The name of a mysql instance.
- Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Mem
Size float64 - Memory size (in MB).
- Volume
Size float64 - Disk size (in GB).
- Auto
Renew float64Flag - Auto renew flag. NOTES: Only supported prepaid instance.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu float64
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- Fast
Upgrade float64 - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - Intranet
Port float64 - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Master
Region string - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- Mysql
Readonly stringInstance Id - ID of the resource.
- Param
Template float64Id - Specify parameter template id.
- Pay
Type float64 - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period float64
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period float64 - Period of instance. NOTES: Only supported prepaid instance.
- Ro
Group stringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- Security
Groups []string - Security groups to use.
- Slave
Deploy float64Mode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - map[string]string
- Instance tags.
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- Wait
Switch float64 - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - Zone string
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- instance
Name String - The name of a mysql instance.
- master
Instance StringId - Indicates the master instance ID of recovery instances.
- mem
Size Double - Memory size (in MB).
- volume
Size Double - Disk size (in GB).
- auto
Renew DoubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Double
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast
Upgrade Double - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - intranet
Port Double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master
Region String - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mysql
Readonly StringInstance Id - ID of the resource.
- param
Template DoubleId - Specify parameter template id.
- pay
Type Double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Double - Period of instance. NOTES: Only supported prepaid instance.
- ro
Group StringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security
Groups List<String> - Security groups to use.
- slave
Deploy DoubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String,String>
- Instance tags.
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait
Switch Double - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone String
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- instance
Name string - The name of a mysql instance.
- master
Instance stringId - Indicates the master instance ID of recovery instances.
- mem
Size number - Memory size (in MB).
- volume
Size number - Disk size (in GB).
- auto
Renew numberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu number
- CPU cores.
- device
Type string - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast
Upgrade number - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force
Delete boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - intranet
Port number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master
Region string - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mysql
Readonly stringInstance Id - ID of the resource.
- param
Template numberId - Specify parameter template id.
- pay
Type number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period number - Period of instance. NOTES: Only supported prepaid instance.
- ro
Group stringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security
Groups string[] - Security groups to use.
- slave
Deploy numberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - {[key: string]: string}
- Instance tags.
- vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait
Switch number - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone string
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- instance_
name str - The name of a mysql instance.
- master_
instance_ strid - Indicates the master instance ID of recovery instances.
- mem_
size float - Memory size (in MB).
- volume_
size float - Disk size (in GB).
- auto_
renew_ floatflag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge_
type str - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu float
- CPU cores.
- device_
type str - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast_
upgrade float - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force_
delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - intranet_
port float - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master_
region str - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mysql_
readonly_ strinstance_ id - ID of the resource.
- param_
template_ floatid - Specify parameter template id.
- pay_
type float - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period float
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid_
period float - Period of instance. NOTES: Only supported prepaid instance.
- ro_
group_ strid - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security_
groups Sequence[str] - Security groups to use.
- slave_
deploy_ floatmode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- subnet_
id str - Private network ID. If
vpc_id
is set, this value is required. - Mapping[str, str]
- Instance tags.
- vpc_
id str - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait_
switch float - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone str
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- instance
Name String - The name of a mysql instance.
- master
Instance StringId - Indicates the master instance ID of recovery instances.
- mem
Size Number - Memory size (in MB).
- volume
Size Number - Disk size (in GB).
- auto
Renew NumberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Number
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast
Upgrade Number - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - intranet
Port Number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master
Region String - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mysql
Readonly StringInstance Id - ID of the resource.
- param
Template NumberId - Specify parameter template id.
- pay
Type Number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Number - Period of instance. NOTES: Only supported prepaid instance.
- ro
Group StringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security
Groups List<String> - Security groups to use.
- slave
Deploy NumberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String>
- Instance tags.
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait
Switch Number - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone String
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
Outputs
All input properties are implicitly available as output properties. Additionally, the MysqlReadonlyInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Intranet
Ip string - instance intranet IP.
- Locked double
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - Status double
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - Task
Status double - Indicates which kind of operations is being executed.
- Id string
- The provider-assigned unique ID for this managed resource.
- Intranet
Ip string - instance intranet IP.
- Locked float64
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - Status float64
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - Task
Status float64 - Indicates which kind of operations is being executed.
- id String
- The provider-assigned unique ID for this managed resource.
- intranet
Ip String - instance intranet IP.
- locked Double
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - status Double
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - task
Status Double - Indicates which kind of operations is being executed.
- id string
- The provider-assigned unique ID for this managed resource.
- intranet
Ip string - instance intranet IP.
- locked number
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - status number
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - task
Status number - Indicates which kind of operations is being executed.
- id str
- The provider-assigned unique ID for this managed resource.
- intranet_
ip str - instance intranet IP.
- locked float
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - status float
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - task_
status float - Indicates which kind of operations is being executed.
- id String
- The provider-assigned unique ID for this managed resource.
- intranet
Ip String - instance intranet IP.
- locked Number
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - status Number
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - task
Status Number - Indicates which kind of operations is being executed.
Look up Existing MysqlReadonlyInstance Resource
Get an existing MysqlReadonlyInstance 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?: MysqlReadonlyInstanceState, opts?: CustomResourceOptions): MysqlReadonlyInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_renew_flag: Optional[float] = None,
charge_type: Optional[str] = None,
cpu: Optional[float] = None,
device_type: Optional[str] = None,
fast_upgrade: Optional[float] = None,
force_delete: Optional[bool] = None,
instance_name: Optional[str] = None,
intranet_ip: Optional[str] = None,
intranet_port: Optional[float] = None,
locked: Optional[float] = None,
master_instance_id: Optional[str] = None,
master_region: Optional[str] = None,
mem_size: Optional[float] = None,
mysql_readonly_instance_id: Optional[str] = None,
param_template_id: Optional[float] = None,
pay_type: Optional[float] = None,
period: Optional[float] = None,
prepaid_period: Optional[float] = None,
ro_group_id: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
slave_deploy_mode: Optional[float] = None,
status: Optional[float] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
task_status: Optional[float] = None,
volume_size: Optional[float] = None,
vpc_id: Optional[str] = None,
wait_switch: Optional[float] = None,
zone: Optional[str] = None) -> MysqlReadonlyInstance
func GetMysqlReadonlyInstance(ctx *Context, name string, id IDInput, state *MysqlReadonlyInstanceState, opts ...ResourceOption) (*MysqlReadonlyInstance, error)
public static MysqlReadonlyInstance Get(string name, Input<string> id, MysqlReadonlyInstanceState? state, CustomResourceOptions? opts = null)
public static MysqlReadonlyInstance get(String name, Output<String> id, MysqlReadonlyInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MysqlReadonlyInstance 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.
- Auto
Renew doubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu double
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- Fast
Upgrade double - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - Instance
Name string - The name of a mysql instance.
- Intranet
Ip string - instance intranet IP.
- Intranet
Port double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Locked double
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Master
Region string - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- Mem
Size double - Memory size (in MB).
- Mysql
Readonly stringInstance Id - ID of the resource.
- Param
Template doubleId - Specify parameter template id.
- Pay
Type double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period double - Period of instance. NOTES: Only supported prepaid instance.
- Ro
Group stringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- Security
Groups List<string> - Security groups to use.
- Slave
Deploy doubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Status double
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - Dictionary<string, string>
- Instance tags.
- Task
Status double - Indicates which kind of operations is being executed.
- Volume
Size double - Disk size (in GB).
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- Wait
Switch double - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - Zone string
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- Auto
Renew float64Flag - Auto renew flag. NOTES: Only supported prepaid instance.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu float64
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- Fast
Upgrade float64 - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - Instance
Name string - The name of a mysql instance.
- Intranet
Ip string - instance intranet IP.
- Intranet
Port float64 - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Locked float64
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Master
Region string - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- Mem
Size float64 - Memory size (in MB).
- Mysql
Readonly stringInstance Id - ID of the resource.
- Param
Template float64Id - Specify parameter template id.
- Pay
Type float64 - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period float64
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period float64 - Period of instance. NOTES: Only supported prepaid instance.
- Ro
Group stringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- Security
Groups []string - Security groups to use.
- Slave
Deploy float64Mode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Status float64
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - map[string]string
- Instance tags.
- Task
Status float64 - Indicates which kind of operations is being executed.
- Volume
Size float64 - Disk size (in GB).
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- Wait
Switch float64 - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - Zone string
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- auto
Renew DoubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Double
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast
Upgrade Double - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - instance
Name String - The name of a mysql instance.
- intranet
Ip String - instance intranet IP.
- intranet
Port Double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - locked Double
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - master
Instance StringId - Indicates the master instance ID of recovery instances.
- master
Region String - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mem
Size Double - Memory size (in MB).
- mysql
Readonly StringInstance Id - ID of the resource.
- param
Template DoubleId - Specify parameter template id.
- pay
Type Double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Double - Period of instance. NOTES: Only supported prepaid instance.
- ro
Group StringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security
Groups List<String> - Security groups to use.
- slave
Deploy DoubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- status Double
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String,String>
- Instance tags.
- task
Status Double - Indicates which kind of operations is being executed.
- volume
Size Double - Disk size (in GB).
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait
Switch Double - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone String
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- auto
Renew numberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu number
- CPU cores.
- device
Type string - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast
Upgrade number - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force
Delete boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - instance
Name string - The name of a mysql instance.
- intranet
Ip string - instance intranet IP.
- intranet
Port number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - locked number
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - master
Instance stringId - Indicates the master instance ID of recovery instances.
- master
Region string - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mem
Size number - Memory size (in MB).
- mysql
Readonly stringInstance Id - ID of the resource.
- param
Template numberId - Specify parameter template id.
- pay
Type number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period number - Period of instance. NOTES: Only supported prepaid instance.
- ro
Group stringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security
Groups string[] - Security groups to use.
- slave
Deploy numberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- status number
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - {[key: string]: string}
- Instance tags.
- task
Status number - Indicates which kind of operations is being executed.
- volume
Size number - Disk size (in GB).
- vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait
Switch number - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone string
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- auto_
renew_ floatflag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge_
type str - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu float
- CPU cores.
- device_
type str - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast_
upgrade float - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force_
delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - instance_
name str - The name of a mysql instance.
- intranet_
ip str - instance intranet IP.
- intranet_
port float - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - locked float
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - master_
instance_ strid - Indicates the master instance ID of recovery instances.
- master_
region str - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mem_
size float - Memory size (in MB).
- mysql_
readonly_ strinstance_ id - ID of the resource.
- param_
template_ floatid - Specify parameter template id.
- pay_
type float - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period float
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid_
period float - Period of instance. NOTES: Only supported prepaid instance.
- ro_
group_ strid - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security_
groups Sequence[str] - Security groups to use.
- slave_
deploy_ floatmode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- status float
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - subnet_
id str - Private network ID. If
vpc_id
is set, this value is required. - Mapping[str, str]
- Instance tags.
- task_
status float - Indicates which kind of operations is being executed.
- volume_
size float - Disk size (in GB).
- vpc_
id str - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait_
switch float - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone str
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
- auto
Renew NumberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Number
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default): universal instance,EXCLUSIVE
: exclusive instance,BASIC_V2
: ONTKE single-node instance,CLOUD_NATIVE_CLUSTER
: cluster version standard type,CLOUD_NATIVE_CLUSTER_EXCLUSIVE
: cluster version enhanced type. If it is not specified, it defaults to a universal instance.
- fast
Upgrade Number - Specify whether to enable fast upgrade when upgrade instance spec, available value:
1
- enabled,0
- disabled. - force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect. - instance
Name String - The name of a mysql instance.
- intranet
Ip String - instance intranet IP.
- intranet
Port Number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - locked Number
- Indicates whether the instance is locked. Valid values:
0
,1
.0
- No;1
- Yes. - master
Instance StringId - Indicates the master instance ID of recovery instances.
- master
Region String - The region information of the master instance. This field is required when purchasing a cross-region subscription.
- mem
Size Number - Memory size (in MB).
- mysql
Readonly StringInstance Id - ID of the resource.
- param
Template NumberId - Specify parameter template id.
- pay
Type Number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Number - Period of instance. NOTES: Only supported prepaid instance.
- ro
Group StringId - Read only group id. If rogroupId is empty, a new ro group is created by default. If it is not empty, the existing ro group is used. Cross-region query requires master instance permission.
- security
Groups List<String> - Security groups to use.
- slave
Deploy NumberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- status Number
- Instance status. Valid values:
0
,1
,4
,5
.0
- Creating;1
- Running;4
- Isolating;5
- Isolated. - subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String>
- Instance tags.
- task
Status Number - Indicates which kind of operations is being executed.
- volume
Size Number - Disk size (in GB).
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
- wait
Switch Number - Switch the method of accessing new instances, default is
0
. Supported values include:0
- switch immediately,1
- switch in time window. - zone String
- Zone information, this parameter defaults to, the system automatically selects an Availability Zone.
Import
mysql read-only database instances can be imported using the id, e.g.
$ pulumi import tencentcloud:index/mysqlReadonlyInstance:MysqlReadonlyInstance default cdb-dnqksd9f
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.