tencentcloud.PostgresqlReadonlyGroup
Explore with Pulumi AI
Use this resource to create postgresql readonly group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-3";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create vpc subnet
const subnet = new tencentcloud.Subnet("subnet", {
availabilityZone: availabilityZone,
vpcId: vpc.vpcId,
cidrBlock: "10.0.20.0/28",
isMulticast: false,
});
// create postgresql
const examplePostgresqlInstance = new tencentcloud.PostgresqlInstance("examplePostgresqlInstance", {
availabilityZone: availabilityZone,
chargeType: "POSTPAID_BY_HOUR",
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
engineVersion: "10.4",
rootUser: "root123",
rootPassword: "Root123$",
charset: "UTF8",
projectId: 0,
memory: 4,
cpu: 2,
storage: 50,
tags: {
test: "tf",
},
});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
description: "sg desc.",
projectId: 0,
tags: {
example: "test",
},
});
const examplePostgresqlReadonlyGroup = new tencentcloud.PostgresqlReadonlyGroup("examplePostgresqlReadonlyGroup", {
masterDbInstanceId: examplePostgresqlInstance.postgresqlInstanceId,
projectId: 0,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
securityGroupsIds: [exampleSecurityGroup.securityGroupId],
replayLagEliminate: 1,
replayLatencyEliminate: 1,
maxReplayLag: 100,
maxReplayLatency: 512,
minDelayEliminateReserve: 1,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-3"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create vpc subnet
subnet = tencentcloud.Subnet("subnet",
availability_zone=availability_zone,
vpc_id=vpc.vpc_id,
cidr_block="10.0.20.0/28",
is_multicast=False)
# create postgresql
example_postgresql_instance = tencentcloud.PostgresqlInstance("examplePostgresqlInstance",
availability_zone=availability_zone,
charge_type="POSTPAID_BY_HOUR",
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
engine_version="10.4",
root_user="root123",
root_password="Root123$",
charset="UTF8",
project_id=0,
memory=4,
cpu=2,
storage=50,
tags={
"test": "tf",
})
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
description="sg desc.",
project_id=0,
tags={
"example": "test",
})
example_postgresql_readonly_group = tencentcloud.PostgresqlReadonlyGroup("examplePostgresqlReadonlyGroup",
master_db_instance_id=example_postgresql_instance.postgresql_instance_id,
project_id=0,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
security_groups_ids=[example_security_group.security_group_id],
replay_lag_eliminate=1,
replay_latency_eliminate=1,
max_replay_lag=100,
max_replay_latency=512,
min_delay_eliminate_reserve=1)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"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, "")
availabilityZone := "ap-guangzhou-3"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create vpc subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
AvailabilityZone: pulumi.String(availabilityZone),
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.20.0/28"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create postgresql
examplePostgresqlInstance, err := tencentcloud.NewPostgresqlInstance(ctx, "examplePostgresqlInstance", &tencentcloud.PostgresqlInstanceArgs{
AvailabilityZone: pulumi.String(availabilityZone),
ChargeType: pulumi.String("POSTPAID_BY_HOUR"),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
EngineVersion: pulumi.String("10.4"),
RootUser: pulumi.String("root123"),
RootPassword: pulumi.String("Root123$"),
Charset: pulumi.String("UTF8"),
ProjectId: pulumi.Float64(0),
Memory: pulumi.Float64(4),
Cpu: pulumi.Float64(2),
Storage: pulumi.Float64(50),
Tags: pulumi.StringMap{
"test": pulumi.String("tf"),
},
})
if err != nil {
return err
}
// create security group
exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("sg desc."),
ProjectId: pulumi.Float64(0),
Tags: pulumi.StringMap{
"example": pulumi.String("test"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewPostgresqlReadonlyGroup(ctx, "examplePostgresqlReadonlyGroup", &tencentcloud.PostgresqlReadonlyGroupArgs{
MasterDbInstanceId: examplePostgresqlInstance.PostgresqlInstanceId,
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
SecurityGroupsIds: pulumi.StringArray{
exampleSecurityGroup.SecurityGroupId,
},
ReplayLagEliminate: pulumi.Float64(1),
ReplayLatencyEliminate: pulumi.Float64(1),
MaxReplayLag: pulumi.Float64(100),
MaxReplayLatency: pulumi.Float64(512),
MinDelayEliminateReserve: pulumi.Float64(1),
})
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 config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-3";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create vpc subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
AvailabilityZone = availabilityZone,
VpcId = vpc.VpcId,
CidrBlock = "10.0.20.0/28",
IsMulticast = false,
});
// create postgresql
var examplePostgresqlInstance = new Tencentcloud.PostgresqlInstance("examplePostgresqlInstance", new()
{
AvailabilityZone = availabilityZone,
ChargeType = "POSTPAID_BY_HOUR",
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
EngineVersion = "10.4",
RootUser = "root123",
RootPassword = "Root123$",
Charset = "UTF8",
ProjectId = 0,
Memory = 4,
Cpu = 2,
Storage = 50,
Tags =
{
{ "test", "tf" },
},
});
// create security group
var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
{
Description = "sg desc.",
ProjectId = 0,
Tags =
{
{ "example", "test" },
},
});
var examplePostgresqlReadonlyGroup = new Tencentcloud.PostgresqlReadonlyGroup("examplePostgresqlReadonlyGroup", new()
{
MasterDbInstanceId = examplePostgresqlInstance.PostgresqlInstanceId,
ProjectId = 0,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
SecurityGroupsIds = new[]
{
exampleSecurityGroup.SecurityGroupId,
},
ReplayLagEliminate = 1,
ReplayLatencyEliminate = 1,
MaxReplayLag = 100,
MaxReplayLatency = 512,
MinDelayEliminateReserve = 1,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.PostgresqlInstance;
import com.pulumi.tencentcloud.PostgresqlInstanceArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.PostgresqlReadonlyGroup;
import com.pulumi.tencentcloud.PostgresqlReadonlyGroupArgs;
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 availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-3");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create vpc subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.availabilityZone(availabilityZone)
.vpcId(vpc.vpcId())
.cidrBlock("10.0.20.0/28")
.isMulticast(false)
.build());
// create postgresql
var examplePostgresqlInstance = new PostgresqlInstance("examplePostgresqlInstance", PostgresqlInstanceArgs.builder()
.availabilityZone(availabilityZone)
.chargeType("POSTPAID_BY_HOUR")
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.engineVersion("10.4")
.rootUser("root123")
.rootPassword("Root123$")
.charset("UTF8")
.projectId(0)
.memory(4)
.cpu(2)
.storage(50)
.tags(Map.of("test", "tf"))
.build());
// create security group
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.description("sg desc.")
.projectId(0)
.tags(Map.of("example", "test"))
.build());
var examplePostgresqlReadonlyGroup = new PostgresqlReadonlyGroup("examplePostgresqlReadonlyGroup", PostgresqlReadonlyGroupArgs.builder()
.masterDbInstanceId(examplePostgresqlInstance.postgresqlInstanceId())
.projectId(0)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.securityGroupsIds(exampleSecurityGroup.securityGroupId())
.replayLagEliminate(1)
.replayLatencyEliminate(1)
.maxReplayLag(100)
.maxReplayLatency(512)
.minDelayEliminateReserve(1)
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-3
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create vpc subnet
subnet:
type: tencentcloud:Subnet
properties:
availabilityZone: ${availabilityZone}
vpcId: ${vpc.vpcId}
cidrBlock: 10.0.20.0/28
isMulticast: false
# create postgresql
examplePostgresqlInstance:
type: tencentcloud:PostgresqlInstance
properties:
availabilityZone: ${availabilityZone}
chargeType: POSTPAID_BY_HOUR
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
engineVersion: '10.4'
rootUser: root123
rootPassword: Root123$
charset: UTF8
projectId: 0
memory: 4
cpu: 2
storage: 50
tags:
test: tf
# create security group
exampleSecurityGroup:
type: tencentcloud:SecurityGroup
properties:
description: sg desc.
projectId: 0
tags:
example: test
examplePostgresqlReadonlyGroup:
type: tencentcloud:PostgresqlReadonlyGroup
properties:
masterDbInstanceId: ${examplePostgresqlInstance.postgresqlInstanceId}
projectId: 0
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
securityGroupsIds:
- ${exampleSecurityGroup.securityGroupId}
replayLagEliminate: 1
replayLatencyEliminate: 1
maxReplayLag: 100
maxReplayLatency: 512
minDelayEliminateReserve: 1
Create PostgresqlReadonlyGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlReadonlyGroup(name: string, args: PostgresqlReadonlyGroupArgs, opts?: CustomResourceOptions);
@overload
def PostgresqlReadonlyGroup(resource_name: str,
args: PostgresqlReadonlyGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlReadonlyGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
master_db_instance_id: Optional[str] = None,
max_replay_lag: Optional[float] = None,
max_replay_latency: Optional[float] = None,
min_delay_eliminate_reserve: Optional[float] = None,
project_id: Optional[float] = None,
replay_lag_eliminate: Optional[float] = None,
replay_latency_eliminate: Optional[float] = None,
subnet_id: Optional[str] = None,
vpc_id: Optional[str] = None,
name: Optional[str] = None,
postgresql_readonly_group_id: Optional[str] = None,
security_groups_ids: Optional[Sequence[str]] = None)
func NewPostgresqlReadonlyGroup(ctx *Context, name string, args PostgresqlReadonlyGroupArgs, opts ...ResourceOption) (*PostgresqlReadonlyGroup, error)
public PostgresqlReadonlyGroup(string name, PostgresqlReadonlyGroupArgs args, CustomResourceOptions? opts = null)
public PostgresqlReadonlyGroup(String name, PostgresqlReadonlyGroupArgs args)
public PostgresqlReadonlyGroup(String name, PostgresqlReadonlyGroupArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlReadonlyGroup
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 PostgresqlReadonlyGroupArgs
- 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 PostgresqlReadonlyGroupArgs
- 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 PostgresqlReadonlyGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlReadonlyGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlReadonlyGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlReadonlyGroup 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 PostgresqlReadonlyGroup resource accepts the following input properties:
- Master
Db stringInstance Id - Primary instance ID.
- Max
Replay doubleLag - Delay threshold in ms.
- Max
Replay doubleLatency - Delayed log size threshold in MB.
- Min
Delay doubleEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- Project
Id double - Project ID.
- Replay
Lag doubleEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Replay
Latency doubleEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Subnet
Id string - VPC subnet ID.
- Vpc
Id string - VPC ID.
- Name string
- RO group name.
- Postgresql
Readonly stringGroup Id - ID of the resource.
- Security
Groups List<string>Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- Master
Db stringInstance Id - Primary instance ID.
- Max
Replay float64Lag - Delay threshold in ms.
- Max
Replay float64Latency - Delayed log size threshold in MB.
- Min
Delay float64Eliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- Project
Id float64 - Project ID.
- Replay
Lag float64Eliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Replay
Latency float64Eliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Subnet
Id string - VPC subnet ID.
- Vpc
Id string - VPC ID.
- Name string
- RO group name.
- Postgresql
Readonly stringGroup Id - ID of the resource.
- Security
Groups []stringIds - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- master
Db StringInstance Id - Primary instance ID.
- max
Replay DoubleLag - Delay threshold in ms.
- max
Replay DoubleLatency - Delayed log size threshold in MB.
- min
Delay DoubleEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- project
Id Double - Project ID.
- replay
Lag DoubleEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay
Latency DoubleEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- subnet
Id String - VPC subnet ID.
- vpc
Id String - VPC ID.
- name String
- RO group name.
- postgresql
Readonly StringGroup Id - ID of the resource.
- security
Groups List<String>Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- master
Db stringInstance Id - Primary instance ID.
- max
Replay numberLag - Delay threshold in ms.
- max
Replay numberLatency - Delayed log size threshold in MB.
- min
Delay numberEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- project
Id number - Project ID.
- replay
Lag numberEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay
Latency numberEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- subnet
Id string - VPC subnet ID.
- vpc
Id string - VPC ID.
- name string
- RO group name.
- postgresql
Readonly stringGroup Id - ID of the resource.
- security
Groups string[]Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- master_
db_ strinstance_ id - Primary instance ID.
- max_
replay_ floatlag - Delay threshold in ms.
- max_
replay_ floatlatency - Delayed log size threshold in MB.
- min_
delay_ floateliminate_ reserve - The minimum number of read-only replicas that must be retained in an RO group.
- project_
id float - Project ID.
- replay_
lag_ floateliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay_
latency_ floateliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- subnet_
id str - VPC subnet ID.
- vpc_
id str - VPC ID.
- name str
- RO group name.
- postgresql_
readonly_ strgroup_ id - ID of the resource.
- security_
groups_ Sequence[str]ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- master
Db StringInstance Id - Primary instance ID.
- max
Replay NumberLag - Delay threshold in ms.
- max
Replay NumberLatency - Delayed log size threshold in MB.
- min
Delay NumberEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- project
Id Number - Project ID.
- replay
Lag NumberEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay
Latency NumberEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- subnet
Id String - VPC subnet ID.
- vpc
Id String - VPC ID.
- name String
- RO group name.
- postgresql
Readonly StringGroup Id - ID of the resource.
- security
Groups List<String>Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlReadonlyGroup resource produces the following output properties:
- Create
Time string - Create time of the postgresql instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Net
Info List<PostgresqlLists Readonly Group Net Info List> - List of db instance net info.
- Create
Time string - Create time of the postgresql instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Net
Info []PostgresqlLists Readonly Group Net Info List - List of db instance net info.
- create
Time String - Create time of the postgresql instance.
- id String
- The provider-assigned unique ID for this managed resource.
- net
Info List<PostgresqlLists Readonly Group Net Info List> - List of db instance net info.
- create
Time string - Create time of the postgresql instance.
- id string
- The provider-assigned unique ID for this managed resource.
- net
Info PostgresqlLists Readonly Group Net Info List[] - List of db instance net info.
- create_
time str - Create time of the postgresql instance.
- id str
- The provider-assigned unique ID for this managed resource.
- net_
info_ Sequence[Postgresqllists Readonly Group Net Info List] - List of db instance net info.
- create
Time String - Create time of the postgresql instance.
- id String
- The provider-assigned unique ID for this managed resource.
- net
Info List<Property Map>Lists - List of db instance net info.
Look up Existing PostgresqlReadonlyGroup Resource
Get an existing PostgresqlReadonlyGroup 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?: PostgresqlReadonlyGroupState, opts?: CustomResourceOptions): PostgresqlReadonlyGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
master_db_instance_id: Optional[str] = None,
max_replay_lag: Optional[float] = None,
max_replay_latency: Optional[float] = None,
min_delay_eliminate_reserve: Optional[float] = None,
name: Optional[str] = None,
net_info_lists: Optional[Sequence[PostgresqlReadonlyGroupNetInfoListArgs]] = None,
postgresql_readonly_group_id: Optional[str] = None,
project_id: Optional[float] = None,
replay_lag_eliminate: Optional[float] = None,
replay_latency_eliminate: Optional[float] = None,
security_groups_ids: Optional[Sequence[str]] = None,
subnet_id: Optional[str] = None,
vpc_id: Optional[str] = None) -> PostgresqlReadonlyGroup
func GetPostgresqlReadonlyGroup(ctx *Context, name string, id IDInput, state *PostgresqlReadonlyGroupState, opts ...ResourceOption) (*PostgresqlReadonlyGroup, error)
public static PostgresqlReadonlyGroup Get(string name, Input<string> id, PostgresqlReadonlyGroupState? state, CustomResourceOptions? opts = null)
public static PostgresqlReadonlyGroup get(String name, Output<String> id, PostgresqlReadonlyGroupState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PostgresqlReadonlyGroup 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.
- Create
Time string - Create time of the postgresql instance.
- Master
Db stringInstance Id - Primary instance ID.
- Max
Replay doubleLag - Delay threshold in ms.
- Max
Replay doubleLatency - Delayed log size threshold in MB.
- Min
Delay doubleEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- Name string
- RO group name.
- Net
Info List<PostgresqlLists Readonly Group Net Info List> - List of db instance net info.
- Postgresql
Readonly stringGroup Id - ID of the resource.
- Project
Id double - Project ID.
- Replay
Lag doubleEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Replay
Latency doubleEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Security
Groups List<string>Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- Subnet
Id string - VPC subnet ID.
- Vpc
Id string - VPC ID.
- Create
Time string - Create time of the postgresql instance.
- Master
Db stringInstance Id - Primary instance ID.
- Max
Replay float64Lag - Delay threshold in ms.
- Max
Replay float64Latency - Delayed log size threshold in MB.
- Min
Delay float64Eliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- Name string
- RO group name.
- Net
Info []PostgresqlLists Readonly Group Net Info List Args - List of db instance net info.
- Postgresql
Readonly stringGroup Id - ID of the resource.
- Project
Id float64 - Project ID.
- Replay
Lag float64Eliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Replay
Latency float64Eliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- Security
Groups []stringIds - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- Subnet
Id string - VPC subnet ID.
- Vpc
Id string - VPC ID.
- create
Time String - Create time of the postgresql instance.
- master
Db StringInstance Id - Primary instance ID.
- max
Replay DoubleLag - Delay threshold in ms.
- max
Replay DoubleLatency - Delayed log size threshold in MB.
- min
Delay DoubleEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- name String
- RO group name.
- net
Info List<PostgresqlLists Readonly Group Net Info List> - List of db instance net info.
- postgresql
Readonly StringGroup Id - ID of the resource.
- project
Id Double - Project ID.
- replay
Lag DoubleEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay
Latency DoubleEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- security
Groups List<String>Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- subnet
Id String - VPC subnet ID.
- vpc
Id String - VPC ID.
- create
Time string - Create time of the postgresql instance.
- master
Db stringInstance Id - Primary instance ID.
- max
Replay numberLag - Delay threshold in ms.
- max
Replay numberLatency - Delayed log size threshold in MB.
- min
Delay numberEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- name string
- RO group name.
- net
Info PostgresqlLists Readonly Group Net Info List[] - List of db instance net info.
- postgresql
Readonly stringGroup Id - ID of the resource.
- project
Id number - Project ID.
- replay
Lag numberEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay
Latency numberEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- security
Groups string[]Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- subnet
Id string - VPC subnet ID.
- vpc
Id string - VPC ID.
- create_
time str - Create time of the postgresql instance.
- master_
db_ strinstance_ id - Primary instance ID.
- max_
replay_ floatlag - Delay threshold in ms.
- max_
replay_ floatlatency - Delayed log size threshold in MB.
- min_
delay_ floateliminate_ reserve - The minimum number of read-only replicas that must be retained in an RO group.
- name str
- RO group name.
- net_
info_ Sequence[Postgresqllists Readonly Group Net Info List Args] - List of db instance net info.
- postgresql_
readonly_ strgroup_ id - ID of the resource.
- project_
id float - Project ID.
- replay_
lag_ floateliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay_
latency_ floateliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- security_
groups_ Sequence[str]ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- subnet_
id str - VPC subnet ID.
- vpc_
id str - VPC ID.
- create
Time String - Create time of the postgresql instance.
- master
Db StringInstance Id - Primary instance ID.
- max
Replay NumberLag - Delay threshold in ms.
- max
Replay NumberLatency - Delayed log size threshold in MB.
- min
Delay NumberEliminate Reserve - The minimum number of read-only replicas that must be retained in an RO group.
- name String
- RO group name.
- net
Info List<Property Map>Lists - List of db instance net info.
- postgresql
Readonly StringGroup Id - ID of the resource.
- project
Id Number - Project ID.
- replay
Lag NumberEliminate - Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- replay
Latency NumberEliminate - Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: 0 (no), 1 (yes).
- security
Groups List<String>Ids - ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- subnet
Id String - VPC subnet ID.
- vpc
Id String - VPC ID.
Supporting Types
PostgresqlReadonlyGroupNetInfoList, PostgresqlReadonlyGroupNetInfoListArgs
Import
postgresql readonly group can be imported, e.g.
$ pulumi import tencentcloud:index/postgresqlReadonlyGroup:PostgresqlReadonlyGroup example pgrogrp-lckioi2a
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.