opentelekomcloud.TaurusdbMysqlProxyV3
Manages a TaurusDB MySQL proxy resource within OpenTelekomCloud.
Example Usage
Basic example
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const instanceId = config.requireObject("instanceId");
const test = new opentelekomcloud.TaurusdbMysqlProxyV3("test", {
instanceId: instanceId,
flavor: "gaussdb.proxy.xlarge.x86.2",
nodeNum: 3,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
instance_id = config.require_object("instanceId")
test = opentelekomcloud.TaurusdbMysqlProxyV3("test",
instance_id=instance_id,
flavor="gaussdb.proxy.xlarge.x86.2",
node_num=3)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
instanceId := cfg.RequireObject("instanceId")
_, err := opentelekomcloud.NewTaurusdbMysqlProxyV3(ctx, "test", &opentelekomcloud.TaurusdbMysqlProxyV3Args{
InstanceId: pulumi.Any(instanceId),
Flavor: pulumi.String("gaussdb.proxy.xlarge.x86.2"),
NodeNum: pulumi.Float64(3),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var instanceId = config.RequireObject<dynamic>("instanceId");
var test = new Opentelekomcloud.TaurusdbMysqlProxyV3("test", new()
{
InstanceId = instanceId,
Flavor = "gaussdb.proxy.xlarge.x86.2",
NodeNum = 3,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.TaurusdbMysqlProxyV3;
import com.pulumi.opentelekomcloud.TaurusdbMysqlProxyV3Args;
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 config = ctx.config();
final var instanceId = config.get("instanceId");
var test = new TaurusdbMysqlProxyV3("test", TaurusdbMysqlProxyV3Args.builder()
.instanceId(instanceId)
.flavor("gaussdb.proxy.xlarge.x86.2")
.nodeNum(3)
.build());
}
}
configuration:
instanceId:
type: dynamic
resources:
test:
type: opentelekomcloud:TaurusdbMysqlProxyV3
properties:
instanceId: ${instanceId}
flavor: gaussdb.proxy.xlarge.x86.2
nodeNum: 3
TaurusDB proxy with weights
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const vpcId = config.requireObject("vpcId");
const subnetId = config.requireObject("subnetId");
const securityGroupId = config.requireObject("securityGroupId");
const instance = new opentelekomcloud.TaurusdbMysqlInstanceV3("instance", {
password: "Test@12345678",
flavor: "gaussdb.mysql.xlarge.x86.8",
vpcId: vpcId,
subnetId: subnetId,
securityGroupId: securityGroupId,
availabilityZoneMode: "multi",
masterAvailabilityZone: "eu-de-01",
readReplicas: 2,
});
const sortedNodes = instance.nodes.apply(nodes => nodes.filter(node => node.type == "master").map(node => (node)));
const readonlyNodes = instance.nodes.apply(nodes => nodes.filter(node => node.type == "slave").map(node => (node)));
const test = new opentelekomcloud.TaurusdbMysqlProxyV3("test", {
instanceId: instance.taurusdbMysqlInstanceV3Id,
flavor: "gaussdb.proxy.large.x86.2",
nodeNum: 3,
proxyName: "taurus-proxy",
proxyMode: "readwrite",
masterNodeWeight: {
id: sortedNodes[0].id,
weight: 40,
},
readonlyNodesWeights: [
{
id: readonlyNodes[0].id,
weight: 30,
},
{
id: readonlyNodes[1].id,
weight: 30,
},
],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
vpc_id = config.require_object("vpcId")
subnet_id = config.require_object("subnetId")
security_group_id = config.require_object("securityGroupId")
instance = opentelekomcloud.TaurusdbMysqlInstanceV3("instance",
password="Test@12345678",
flavor="gaussdb.mysql.xlarge.x86.8",
vpc_id=vpc_id,
subnet_id=subnet_id,
security_group_id=security_group_id,
availability_zone_mode="multi",
master_availability_zone="eu-de-01",
read_replicas=2)
sorted_nodes = instance.nodes.apply(lambda nodes: [node for node in nodes if node.type == "master"])
readonly_nodes = instance.nodes.apply(lambda nodes: [node for node in nodes if node.type == "slave"])
test = opentelekomcloud.TaurusdbMysqlProxyV3("test",
instance_id=instance.taurusdb_mysql_instance_v3_id,
flavor="gaussdb.proxy.large.x86.2",
node_num=3,
proxy_name="taurus-proxy",
proxy_mode="readwrite",
master_node_weight={
"id": sorted_nodes[0]["id"],
"weight": 40,
},
readonly_nodes_weights=[
{
"id": readonly_nodes[0]["id"],
"weight": 30,
},
{
"id": readonly_nodes[1]["id"],
"weight": 30,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
vpcId := cfg.RequireObject("vpcId")
subnetId := cfg.RequireObject("subnetId")
securityGroupId := cfg.RequireObject("securityGroupId")
instance, err := opentelekomcloud.NewTaurusdbMysqlInstanceV3(ctx, "instance", &opentelekomcloud.TaurusdbMysqlInstanceV3Args{
Password: pulumi.String("Test@12345678"),
Flavor: pulumi.String("gaussdb.mysql.xlarge.x86.8"),
VpcId: pulumi.Any(vpcId),
SubnetId: pulumi.Any(subnetId),
SecurityGroupId: pulumi.Any(securityGroupId),
AvailabilityZoneMode: pulumi.String("multi"),
MasterAvailabilityZone: pulumi.String("eu-de-01"),
ReadReplicas: pulumi.Float64(2),
})
if err != nil {
return err
}
sortedNodes := instance.Nodes.ApplyT(func(nodes []opentelekomcloud.TaurusdbMysqlInstanceV3Node) ([]opentelekomcloud.TaurusdbMysqlInstanceV3Node, error) {
return "TODO: For expression", nil
}).([]opentelekomcloud.TaurusdbMysqlInstanceV3NodeOutput)
readonlyNodes := instance.Nodes.ApplyT(func(nodes []opentelekomcloud.TaurusdbMysqlInstanceV3Node) ([]opentelekomcloud.TaurusdbMysqlInstanceV3Node, error) {
return "TODO: For expression", nil
}).([]opentelekomcloud.TaurusdbMysqlInstanceV3NodeOutput)
_, err = opentelekomcloud.NewTaurusdbMysqlProxyV3(ctx, "test", &opentelekomcloud.TaurusdbMysqlProxyV3Args{
InstanceId: instance.TaurusdbMysqlInstanceV3Id,
Flavor: pulumi.String("gaussdb.proxy.large.x86.2"),
NodeNum: pulumi.Float64(3),
ProxyName: pulumi.String("taurus-proxy"),
ProxyMode: pulumi.String("readwrite"),
MasterNodeWeight: &opentelekomcloud.TaurusdbMysqlProxyV3MasterNodeWeightArgs{
Id: pulumi.String(sortedNodes[0].Id),
Weight: pulumi.Float64(40),
},
ReadonlyNodesWeights: opentelekomcloud.TaurusdbMysqlProxyV3ReadonlyNodesWeightArray{
&opentelekomcloud.TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs{
Id: pulumi.String(readonlyNodes[0].Id),
Weight: pulumi.Float64(30),
},
&opentelekomcloud.TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs{
Id: pulumi.String(readonlyNodes[1].Id),
Weight: pulumi.Float64(30),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var vpcId = config.RequireObject<dynamic>("vpcId");
var subnetId = config.RequireObject<dynamic>("subnetId");
var securityGroupId = config.RequireObject<dynamic>("securityGroupId");
var instance = new Opentelekomcloud.TaurusdbMysqlInstanceV3("instance", new()
{
Password = "Test@12345678",
Flavor = "gaussdb.mysql.xlarge.x86.8",
VpcId = vpcId,
SubnetId = subnetId,
SecurityGroupId = securityGroupId,
AvailabilityZoneMode = "multi",
MasterAvailabilityZone = "eu-de-01",
ReadReplicas = 2,
});
var sortedNodes = instance.Nodes.Apply(nodes => nodes.Where(node => node.Type == "master").Select(node =>
{
return node;
}).ToList());
var readonlyNodes = instance.Nodes.Apply(nodes => nodes.Where(node => node.Type == "slave").Select(node =>
{
return node;
}).ToList());
var test = new Opentelekomcloud.TaurusdbMysqlProxyV3("test", new()
{
InstanceId = instance.TaurusdbMysqlInstanceV3Id,
Flavor = "gaussdb.proxy.large.x86.2",
NodeNum = 3,
ProxyName = "taurus-proxy",
ProxyMode = "readwrite",
MasterNodeWeight = new Opentelekomcloud.Inputs.TaurusdbMysqlProxyV3MasterNodeWeightArgs
{
Id = sortedNodes[0].Id,
Weight = 40,
},
ReadonlyNodesWeights = new[]
{
new Opentelekomcloud.Inputs.TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs
{
Id = readonlyNodes[0].Id,
Weight = 30,
},
new Opentelekomcloud.Inputs.TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs
{
Id = readonlyNodes[1].Id,
Weight = 30,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.TaurusdbMysqlInstanceV3;
import com.pulumi.opentelekomcloud.TaurusdbMysqlInstanceV3Args;
import com.pulumi.opentelekomcloud.TaurusdbMysqlProxyV3;
import com.pulumi.opentelekomcloud.TaurusdbMysqlProxyV3Args;
import com.pulumi.opentelekomcloud.inputs.TaurusdbMysqlProxyV3MasterNodeWeightArgs;
import com.pulumi.opentelekomcloud.inputs.TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs;
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 config = ctx.config();
final var vpcId = config.get("vpcId");
final var subnetId = config.get("subnetId");
final var securityGroupId = config.get("securityGroupId");
var instance = new TaurusdbMysqlInstanceV3("instance", TaurusdbMysqlInstanceV3Args.builder()
.password("Test@12345678")
.flavor("gaussdb.mysql.xlarge.x86.8")
.vpcId(vpcId)
.subnetId(subnetId)
.securityGroupId(securityGroupId)
.availabilityZoneMode("multi")
.masterAvailabilityZone("eu-de-01")
.readReplicas(2)
.build());
final var sortedNodes = instance.nodes().applyValue(nodes -> "TODO: ForExpression");
final var readonlyNodes = instance.nodes().applyValue(nodes -> "TODO: ForExpression");
var test = new TaurusdbMysqlProxyV3("test", TaurusdbMysqlProxyV3Args.builder()
.instanceId(instance.taurusdbMysqlInstanceV3Id())
.flavor("gaussdb.proxy.large.x86.2")
.nodeNum(3)
.proxyName("taurus-proxy")
.proxyMode("readwrite")
.masterNodeWeight(TaurusdbMysqlProxyV3MasterNodeWeightArgs.builder()
.id(sortedNodes[0].id())
.weight(40)
.build())
.readonlyNodesWeights(
TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs.builder()
.id(readonlyNodes[0].id())
.weight(30)
.build(),
TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs.builder()
.id(readonlyNodes[1].id())
.weight(30)
.build())
.build());
}
}
Example coming soon!
Create TaurusdbMysqlProxyV3 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TaurusdbMysqlProxyV3(name: string, args: TaurusdbMysqlProxyV3Args, opts?: CustomResourceOptions);@overload
def TaurusdbMysqlProxyV3(resource_name: str,
args: TaurusdbMysqlProxyV3Args,
opts: Optional[ResourceOptions] = None)
@overload
def TaurusdbMysqlProxyV3(resource_name: str,
opts: Optional[ResourceOptions] = None,
flavor: Optional[str] = None,
instance_id: Optional[str] = None,
node_num: Optional[float] = None,
master_node_weight: Optional[TaurusdbMysqlProxyV3MasterNodeWeightArgs] = None,
proxy_mode: Optional[str] = None,
proxy_name: Optional[str] = None,
readonly_nodes_weights: Optional[Sequence[TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs]] = None,
taurusdb_mysql_proxy_v3_id: Optional[str] = None,
timeouts: Optional[TaurusdbMysqlProxyV3TimeoutsArgs] = None)func NewTaurusdbMysqlProxyV3(ctx *Context, name string, args TaurusdbMysqlProxyV3Args, opts ...ResourceOption) (*TaurusdbMysqlProxyV3, error)public TaurusdbMysqlProxyV3(string name, TaurusdbMysqlProxyV3Args args, CustomResourceOptions? opts = null)
public TaurusdbMysqlProxyV3(String name, TaurusdbMysqlProxyV3Args args)
public TaurusdbMysqlProxyV3(String name, TaurusdbMysqlProxyV3Args args, CustomResourceOptions options)
type: opentelekomcloud:TaurusdbMysqlProxyV3
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 TaurusdbMysqlProxyV3Args
- 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 TaurusdbMysqlProxyV3Args
- 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 TaurusdbMysqlProxyV3Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TaurusdbMysqlProxyV3Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TaurusdbMysqlProxyV3Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var taurusdbMysqlProxyV3Resource = new Opentelekomcloud.TaurusdbMysqlProxyV3("taurusdbMysqlProxyV3Resource", new()
{
Flavor = "string",
InstanceId = "string",
NodeNum = 0,
MasterNodeWeight = new Opentelekomcloud.Inputs.TaurusdbMysqlProxyV3MasterNodeWeightArgs
{
Id = "string",
Weight = 0,
},
ProxyMode = "string",
ProxyName = "string",
ReadonlyNodesWeights = new[]
{
new Opentelekomcloud.Inputs.TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs
{
Id = "string",
Weight = 0,
},
},
TaurusdbMysqlProxyV3Id = "string",
Timeouts = new Opentelekomcloud.Inputs.TaurusdbMysqlProxyV3TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := opentelekomcloud.NewTaurusdbMysqlProxyV3(ctx, "taurusdbMysqlProxyV3Resource", &opentelekomcloud.TaurusdbMysqlProxyV3Args{
Flavor: pulumi.String("string"),
InstanceId: pulumi.String("string"),
NodeNum: pulumi.Float64(0),
MasterNodeWeight: &opentelekomcloud.TaurusdbMysqlProxyV3MasterNodeWeightArgs{
Id: pulumi.String("string"),
Weight: pulumi.Float64(0),
},
ProxyMode: pulumi.String("string"),
ProxyName: pulumi.String("string"),
ReadonlyNodesWeights: opentelekomcloud.TaurusdbMysqlProxyV3ReadonlyNodesWeightArray{
&opentelekomcloud.TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs{
Id: pulumi.String("string"),
Weight: pulumi.Float64(0),
},
},
TaurusdbMysqlProxyV3Id: pulumi.String("string"),
Timeouts: &opentelekomcloud.TaurusdbMysqlProxyV3TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var taurusdbMysqlProxyV3Resource = new TaurusdbMysqlProxyV3("taurusdbMysqlProxyV3Resource", TaurusdbMysqlProxyV3Args.builder()
.flavor("string")
.instanceId("string")
.nodeNum(0.0)
.masterNodeWeight(TaurusdbMysqlProxyV3MasterNodeWeightArgs.builder()
.id("string")
.weight(0.0)
.build())
.proxyMode("string")
.proxyName("string")
.readonlyNodesWeights(TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs.builder()
.id("string")
.weight(0.0)
.build())
.taurusdbMysqlProxyV3Id("string")
.timeouts(TaurusdbMysqlProxyV3TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
taurusdb_mysql_proxy_v3_resource = opentelekomcloud.TaurusdbMysqlProxyV3("taurusdbMysqlProxyV3Resource",
flavor="string",
instance_id="string",
node_num=0,
master_node_weight={
"id": "string",
"weight": 0,
},
proxy_mode="string",
proxy_name="string",
readonly_nodes_weights=[{
"id": "string",
"weight": 0,
}],
taurusdb_mysql_proxy_v3_id="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const taurusdbMysqlProxyV3Resource = new opentelekomcloud.TaurusdbMysqlProxyV3("taurusdbMysqlProxyV3Resource", {
flavor: "string",
instanceId: "string",
nodeNum: 0,
masterNodeWeight: {
id: "string",
weight: 0,
},
proxyMode: "string",
proxyName: "string",
readonlyNodesWeights: [{
id: "string",
weight: 0,
}],
taurusdbMysqlProxyV3Id: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: opentelekomcloud:TaurusdbMysqlProxyV3
properties:
flavor: string
instanceId: string
masterNodeWeight:
id: string
weight: 0
nodeNum: 0
proxyMode: string
proxyName: string
readonlyNodesWeights:
- id: string
weight: 0
taurusdbMysqlProxyV3Id: string
timeouts:
create: string
delete: string
update: string
TaurusdbMysqlProxyV3 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 TaurusdbMysqlProxyV3 resource accepts the following input properties:
- Flavor string
- Specifies the flavor of the proxy.
- Instance
Id string - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- Node
Num double - Specifies the node count of the proxy.
- Master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- Proxy
Mode string Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- Proxy
Name string - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - Readonly
Nodes List<TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight> Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- Taurusdb
Mysql stringProxy V3Id - Specifies the ID of the node.
- Timeouts
Taurusdb
Mysql Proxy V3Timeouts
- Flavor string
- Specifies the flavor of the proxy.
- Instance
Id string - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- Node
Num float64 - Specifies the node count of the proxy.
- Master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight Args - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- Proxy
Mode string Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- Proxy
Name string - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - Readonly
Nodes []TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight Args Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- Taurusdb
Mysql stringProxy V3Id - Specifies the ID of the node.
- Timeouts
Taurusdb
Mysql Proxy V3Timeouts Args
- flavor String
- Specifies the flavor of the proxy.
- instance
Id String - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- node
Num Double - Specifies the node count of the proxy.
- master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- proxy
Mode String Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy
Name String - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly
Nodes List<TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight> Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- taurusdb
Mysql StringProxy V3Id - Specifies the ID of the node.
- timeouts
Taurusdb
Mysql Proxy V3Timeouts
- flavor string
- Specifies the flavor of the proxy.
- instance
Id string - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- node
Num number - Specifies the node count of the proxy.
- master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- proxy
Mode string Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy
Name string - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly
Nodes TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight[] Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- taurusdb
Mysql stringProxy V3Id - Specifies the ID of the node.
- timeouts
Taurusdb
Mysql Proxy V3Timeouts
- flavor str
- Specifies the flavor of the proxy.
- instance_
id str - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- node_
num float - Specifies the node count of the proxy.
- master_
node_ Taurusdbweight Mysql Proxy V3Master Node Weight Args - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- proxy_
mode str Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy_
name str - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly_
nodes_ Sequence[Taurusdbweights Mysql Proxy V3Readonly Nodes Weight Args] Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- taurusdb_
mysql_ strproxy_ v3_ id - Specifies the ID of the node.
- timeouts
Taurusdb
Mysql Proxy V3Timeouts Args
- flavor String
- Specifies the flavor of the proxy.
- instance
Id String - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- node
Num Number - Specifies the node count of the proxy.
- master
Node Property MapWeight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- proxy
Mode String Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy
Name String - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly
Nodes List<Property Map>Weights Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- taurusdb
Mysql StringProxy V3Id - Specifies the ID of the node.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the TaurusdbMysqlProxyV3 resource produces the following output properties:
- Address string
- Indicates the address of the proxy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Nodes
List<Taurusdb
Mysql Proxy V3Node> - Indicates the node information of the proxy.
- Port double
- Indicates the port of the proxy.
- Region string
- Indicates the region in which to create the resource.
- Status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- Address string
- Indicates the address of the proxy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Nodes
[]Taurusdb
Mysql Proxy V3Node - Indicates the node information of the proxy.
- Port float64
- Indicates the port of the proxy.
- Region string
- Indicates the region in which to create the resource.
- Status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- address String
- Indicates the address of the proxy.
- id String
- The provider-assigned unique ID for this managed resource.
- nodes
List<Taurusdb
Mysql Proxy V3Node> - Indicates the node information of the proxy.
- port Double
- Indicates the port of the proxy.
- region String
- Indicates the region in which to create the resource.
- status String
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- address string
- Indicates the address of the proxy.
- id string
- The provider-assigned unique ID for this managed resource.
- nodes
Taurusdb
Mysql Proxy V3Node[] - Indicates the node information of the proxy.
- port number
- Indicates the port of the proxy.
- region string
- Indicates the region in which to create the resource.
- status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- address str
- Indicates the address of the proxy.
- id str
- The provider-assigned unique ID for this managed resource.
- nodes
Sequence[Taurusdb
Mysql Proxy V3Node] - Indicates the node information of the proxy.
- port float
- Indicates the port of the proxy.
- region str
- Indicates the region in which to create the resource.
- status str
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- address String
- Indicates the address of the proxy.
- id String
- The provider-assigned unique ID for this managed resource.
- nodes List<Property Map>
- Indicates the node information of the proxy.
- port Number
- Indicates the port of the proxy.
- region String
- Indicates the region in which to create the resource.
- status String
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
Look up Existing TaurusdbMysqlProxyV3 Resource
Get an existing TaurusdbMysqlProxyV3 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?: TaurusdbMysqlProxyV3State, opts?: CustomResourceOptions): TaurusdbMysqlProxyV3@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
flavor: Optional[str] = None,
instance_id: Optional[str] = None,
master_node_weight: Optional[TaurusdbMysqlProxyV3MasterNodeWeightArgs] = None,
node_num: Optional[float] = None,
nodes: Optional[Sequence[TaurusdbMysqlProxyV3NodeArgs]] = None,
port: Optional[float] = None,
proxy_mode: Optional[str] = None,
proxy_name: Optional[str] = None,
readonly_nodes_weights: Optional[Sequence[TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs]] = None,
region: Optional[str] = None,
status: Optional[str] = None,
taurusdb_mysql_proxy_v3_id: Optional[str] = None,
timeouts: Optional[TaurusdbMysqlProxyV3TimeoutsArgs] = None) -> TaurusdbMysqlProxyV3func GetTaurusdbMysqlProxyV3(ctx *Context, name string, id IDInput, state *TaurusdbMysqlProxyV3State, opts ...ResourceOption) (*TaurusdbMysqlProxyV3, error)public static TaurusdbMysqlProxyV3 Get(string name, Input<string> id, TaurusdbMysqlProxyV3State? state, CustomResourceOptions? opts = null)public static TaurusdbMysqlProxyV3 get(String name, Output<String> id, TaurusdbMysqlProxyV3State state, CustomResourceOptions options)resources: _: type: opentelekomcloud:TaurusdbMysqlProxyV3 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.
- Address string
- Indicates the address of the proxy.
- Flavor string
- Specifies the flavor of the proxy.
- Instance
Id string - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- Master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- Node
Num double - Specifies the node count of the proxy.
- Nodes
List<Taurusdb
Mysql Proxy V3Node> - Indicates the node information of the proxy.
- Port double
- Indicates the port of the proxy.
- Proxy
Mode string Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- Proxy
Name string - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - Readonly
Nodes List<TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight> Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- Region string
- Indicates the region in which to create the resource.
- Status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- Taurusdb
Mysql stringProxy V3Id - Specifies the ID of the node.
- Timeouts
Taurusdb
Mysql Proxy V3Timeouts
- Address string
- Indicates the address of the proxy.
- Flavor string
- Specifies the flavor of the proxy.
- Instance
Id string - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- Master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight Args - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- Node
Num float64 - Specifies the node count of the proxy.
- Nodes
[]Taurusdb
Mysql Proxy V3Node Args - Indicates the node information of the proxy.
- Port float64
- Indicates the port of the proxy.
- Proxy
Mode string Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- Proxy
Name string - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - Readonly
Nodes []TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight Args Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- Region string
- Indicates the region in which to create the resource.
- Status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- Taurusdb
Mysql stringProxy V3Id - Specifies the ID of the node.
- Timeouts
Taurusdb
Mysql Proxy V3Timeouts Args
- address String
- Indicates the address of the proxy.
- flavor String
- Specifies the flavor of the proxy.
- instance
Id String - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- node
Num Double - Specifies the node count of the proxy.
- nodes
List<Taurusdb
Mysql Proxy V3Node> - Indicates the node information of the proxy.
- port Double
- Indicates the port of the proxy.
- proxy
Mode String Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy
Name String - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly
Nodes List<TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight> Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- region String
- Indicates the region in which to create the resource.
- status String
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- taurusdb
Mysql StringProxy V3Id - Specifies the ID of the node.
- timeouts
Taurusdb
Mysql Proxy V3Timeouts
- address string
- Indicates the address of the proxy.
- flavor string
- Specifies the flavor of the proxy.
- instance
Id string - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- master
Node TaurusdbWeight Mysql Proxy V3Master Node Weight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- node
Num number - Specifies the node count of the proxy.
- nodes
Taurusdb
Mysql Proxy V3Node[] - Indicates the node information of the proxy.
- port number
- Indicates the port of the proxy.
- proxy
Mode string Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy
Name string - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly
Nodes TaurusdbWeights Mysql Proxy V3Readonly Nodes Weight[] Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- region string
- Indicates the region in which to create the resource.
- status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- taurusdb
Mysql stringProxy V3Id - Specifies the ID of the node.
- timeouts
Taurusdb
Mysql Proxy V3Timeouts
- address str
- Indicates the address of the proxy.
- flavor str
- Specifies the flavor of the proxy.
- instance_
id str - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- master_
node_ Taurusdbweight Mysql Proxy V3Master Node Weight Args - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- node_
num float - Specifies the node count of the proxy.
- nodes
Sequence[Taurusdb
Mysql Proxy V3Node Args] - Indicates the node information of the proxy.
- port float
- Indicates the port of the proxy.
- proxy_
mode str Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy_
name str - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly_
nodes_ Sequence[Taurusdbweights Mysql Proxy V3Readonly Nodes Weight Args] Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- region str
- Indicates the region in which to create the resource.
- status str
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- taurusdb_
mysql_ strproxy_ v3_ id - Specifies the ID of the node.
- timeouts
Taurusdb
Mysql Proxy V3Timeouts Args
- address String
- Indicates the address of the proxy.
- flavor String
- Specifies the flavor of the proxy.
- instance
Id String - Specifies the ID of the TaurusDB MySQL instance. Changing this parameter will create a new resource.
- master
Node Property MapWeight - Specifies the read weight of the master node. The master_node_weight structure is documented below.
- node
Num Number - Specifies the node count of the proxy.
- nodes List<Property Map>
- Indicates the node information of the proxy.
- port Number
- Indicates the port of the proxy.
- proxy
Mode String Specifies the type of the proxy. Changing this creates a new resource. Value options: readwrite: read and write. readonly: read-only.
Defaults to readwrite.
- proxy
Name String - Specifies the name of the proxy. The name consists of
4to64characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_). - readonly
Nodes List<Property Map>Weights Specifies the read weight of the read-only nodes. The readonly_nodes_weight structure is documented below.
The
master_node_weightandreadonly_nodes_weightblock supports:- region String
- Indicates the region in which to create the resource.
- status String
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- taurusdb
Mysql StringProxy V3Id - Specifies the ID of the node.
- timeouts Property Map
Supporting Types
TaurusdbMysqlProxyV3MasterNodeWeight, TaurusdbMysqlProxyV3MasterNodeWeightArgs
TaurusdbMysqlProxyV3Node, TaurusdbMysqlProxyV3NodeArgs
- Az
Code string - Indicates the proxy node availability zone.
- Frozen
Flag double - Indicates whether the proxy node is frozen. The values can be:
- 0: unfrozen.
- 1: frozen.
- 2: deleted after being frozen.
- Id string
- Specifies the ID of the node.
- Name string
- Indicates the proxy node name.
- Role string
- Indicates the proxy node role. The values can be:
- master: primary node.
- slave: read replica.
- Status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- Az
Code string - Indicates the proxy node availability zone.
- Frozen
Flag float64 - Indicates whether the proxy node is frozen. The values can be:
- 0: unfrozen.
- 1: frozen.
- 2: deleted after being frozen.
- Id string
- Specifies the ID of the node.
- Name string
- Indicates the proxy node name.
- Role string
- Indicates the proxy node role. The values can be:
- master: primary node.
- slave: read replica.
- Status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- az
Code String - Indicates the proxy node availability zone.
- frozen
Flag Double - Indicates whether the proxy node is frozen. The values can be:
- 0: unfrozen.
- 1: frozen.
- 2: deleted after being frozen.
- id String
- Specifies the ID of the node.
- name String
- Indicates the proxy node name.
- role String
- Indicates the proxy node role. The values can be:
- master: primary node.
- slave: read replica.
- status String
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- az
Code string - Indicates the proxy node availability zone.
- frozen
Flag number - Indicates whether the proxy node is frozen. The values can be:
- 0: unfrozen.
- 1: frozen.
- 2: deleted after being frozen.
- id string
- Specifies the ID of the node.
- name string
- Indicates the proxy node name.
- role string
- Indicates the proxy node role. The values can be:
- master: primary node.
- slave: read replica.
- status string
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- az_
code str - Indicates the proxy node availability zone.
- frozen_
flag float - Indicates whether the proxy node is frozen. The values can be:
- 0: unfrozen.
- 1: frozen.
- 2: deleted after being frozen.
- id str
- Specifies the ID of the node.
- name str
- Indicates the proxy node name.
- role str
- Indicates the proxy node role. The values can be:
- master: primary node.
- slave: read replica.
- status str
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
- az
Code String - Indicates the proxy node availability zone.
- frozen
Flag Number - Indicates whether the proxy node is frozen. The values can be:
- 0: unfrozen.
- 1: frozen.
- 2: deleted after being frozen.
- id String
- Specifies the ID of the node.
- name String
- Indicates the proxy node name.
- role String
- Indicates the proxy node role. The values can be:
- master: primary node.
- slave: read replica.
- status String
- Indicates the proxy node status. The values can be:
- ACTIVE: The node is available.
- ABNORMAL: The node is abnormal.
- FAILED: The node fails.
- DELETED: The node has been deleted.
TaurusdbMysqlProxyV3ReadonlyNodesWeight, TaurusdbMysqlProxyV3ReadonlyNodesWeightArgs
TaurusdbMysqlProxyV3Timeouts, TaurusdbMysqlProxyV3TimeoutsArgs
Import
The TaurusDB MySQL proxy can be imported using the instance_id and id separated by a slash, e.g.
bash
$ pulumi import opentelekomcloud:index/taurusdbMysqlProxyV3:TaurusdbMysqlProxyV3 test <instance_id>/<id>
`
Note that the imported state may not be identical to your resource definition, due to the attribute missing from the
API response. The missing attributes are: proxy_mode, master_node_weight and readonly_nodes_weight. It is
generally recommended running pulumi preview after importing a TaurusDB MySQL proxy. You can then decide if changes
should be applied to the TaurusDB MySQL proxy, or the resource definition should be updated to align with the TaurusDB
MySQL proxy. Also you can ignore changes as below.
hcl
resource “opentelekomcloud_taurusdb_mysql_proxy_v3” “test” {
…
lifecycle {
ignore_changes = [
proxy_mode, master_node_weight, readonly_nodes_weight,
]
}
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloudTerraform Provider.
