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:
- MasterDb stringInstance Id 
- Primary instance ID.
- MaxReplay doubleLag 
- Delay threshold in ms.
- MaxReplay doubleLatency 
- Delayed log size threshold in MB.
- MinDelay doubleEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- ProjectId double
- Project ID.
- ReplayLag 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).
- ReplayLatency 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).
- SubnetId string
- VPC subnet ID.
- VpcId string
- VPC ID.
- Name string
- RO group name.
- PostgresqlReadonly stringGroup Id 
- ID of the resource.
- SecurityGroups List<string>Ids 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- MasterDb stringInstance Id 
- Primary instance ID.
- MaxReplay float64Lag 
- Delay threshold in ms.
- MaxReplay float64Latency 
- Delayed log size threshold in MB.
- MinDelay float64Eliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- ProjectId float64
- Project ID.
- ReplayLag 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).
- ReplayLatency 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).
- SubnetId string
- VPC subnet ID.
- VpcId string
- VPC ID.
- Name string
- RO group name.
- PostgresqlReadonly stringGroup Id 
- ID of the resource.
- SecurityGroups []stringIds 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- masterDb StringInstance Id 
- Primary instance ID.
- maxReplay DoubleLag 
- Delay threshold in ms.
- maxReplay DoubleLatency 
- Delayed log size threshold in MB.
- minDelay DoubleEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- projectId Double
- Project ID.
- replayLag 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).
- replayLatency 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).
- subnetId String
- VPC subnet ID.
- vpcId String
- VPC ID.
- name String
- RO group name.
- postgresqlReadonly StringGroup Id 
- ID of the resource.
- securityGroups List<String>Ids 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- masterDb stringInstance Id 
- Primary instance ID.
- maxReplay numberLag 
- Delay threshold in ms.
- maxReplay numberLatency 
- Delayed log size threshold in MB.
- minDelay numberEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- projectId number
- Project ID.
- replayLag 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).
- replayLatency 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).
- subnetId string
- VPC subnet ID.
- vpcId string
- VPC ID.
- name string
- RO group name.
- postgresqlReadonly stringGroup Id 
- ID of the resource.
- securityGroups 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.
- masterDb StringInstance Id 
- Primary instance ID.
- maxReplay NumberLag 
- Delay threshold in ms.
- maxReplay NumberLatency 
- Delayed log size threshold in MB.
- minDelay NumberEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- projectId Number
- Project ID.
- replayLag 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).
- replayLatency 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).
- subnetId String
- VPC subnet ID.
- vpcId String
- VPC ID.
- name String
- RO group name.
- postgresqlReadonly StringGroup Id 
- ID of the resource.
- securityGroups 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:
- CreateTime string
- Create time of the postgresql instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- NetInfo List<PostgresqlLists Readonly Group Net Info List> 
- List of db instance net info.
- CreateTime string
- Create time of the postgresql instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- NetInfo []PostgresqlLists Readonly Group Net Info List 
- List of db instance net info.
- createTime String
- Create time of the postgresql instance.
- id String
- The provider-assigned unique ID for this managed resource.
- netInfo List<PostgresqlLists Readonly Group Net Info List> 
- List of db instance net info.
- createTime string
- Create time of the postgresql instance.
- id string
- The provider-assigned unique ID for this managed resource.
- netInfo 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.
- createTime String
- Create time of the postgresql instance.
- id String
- The provider-assigned unique ID for this managed resource.
- netInfo 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) -> PostgresqlReadonlyGroupfunc 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.
- CreateTime string
- Create time of the postgresql instance.
- MasterDb stringInstance Id 
- Primary instance ID.
- MaxReplay doubleLag 
- Delay threshold in ms.
- MaxReplay doubleLatency 
- Delayed log size threshold in MB.
- MinDelay doubleEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- Name string
- RO group name.
- NetInfo List<PostgresqlLists Readonly Group Net Info List> 
- List of db instance net info.
- PostgresqlReadonly stringGroup Id 
- ID of the resource.
- ProjectId double
- Project ID.
- ReplayLag 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).
- ReplayLatency 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).
- SecurityGroups List<string>Ids 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- SubnetId string
- VPC subnet ID.
- VpcId string
- VPC ID.
- CreateTime string
- Create time of the postgresql instance.
- MasterDb stringInstance Id 
- Primary instance ID.
- MaxReplay float64Lag 
- Delay threshold in ms.
- MaxReplay float64Latency 
- Delayed log size threshold in MB.
- MinDelay float64Eliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- Name string
- RO group name.
- NetInfo []PostgresqlLists Readonly Group Net Info List Args 
- List of db instance net info.
- PostgresqlReadonly stringGroup Id 
- ID of the resource.
- ProjectId float64
- Project ID.
- ReplayLag 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).
- ReplayLatency 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).
- SecurityGroups []stringIds 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- SubnetId string
- VPC subnet ID.
- VpcId string
- VPC ID.
- createTime String
- Create time of the postgresql instance.
- masterDb StringInstance Id 
- Primary instance ID.
- maxReplay DoubleLag 
- Delay threshold in ms.
- maxReplay DoubleLatency 
- Delayed log size threshold in MB.
- minDelay DoubleEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- name String
- RO group name.
- netInfo List<PostgresqlLists Readonly Group Net Info List> 
- List of db instance net info.
- postgresqlReadonly StringGroup Id 
- ID of the resource.
- projectId Double
- Project ID.
- replayLag 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).
- replayLatency 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).
- securityGroups List<String>Ids 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- subnetId String
- VPC subnet ID.
- vpcId String
- VPC ID.
- createTime string
- Create time of the postgresql instance.
- masterDb stringInstance Id 
- Primary instance ID.
- maxReplay numberLag 
- Delay threshold in ms.
- maxReplay numberLatency 
- Delayed log size threshold in MB.
- minDelay numberEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- name string
- RO group name.
- netInfo PostgresqlLists Readonly Group Net Info List[] 
- List of db instance net info.
- postgresqlReadonly stringGroup Id 
- ID of the resource.
- projectId number
- Project ID.
- replayLag 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).
- replayLatency 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).
- securityGroups string[]Ids 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- subnetId string
- VPC subnet ID.
- vpcId 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.
- createTime String
- Create time of the postgresql instance.
- masterDb StringInstance Id 
- Primary instance ID.
- maxReplay NumberLag 
- Delay threshold in ms.
- maxReplay NumberLatency 
- Delayed log size threshold in MB.
- minDelay NumberEliminate Reserve 
- The minimum number of read-only replicas that must be retained in an RO group.
- name String
- RO group name.
- netInfo List<Property Map>Lists 
- List of db instance net info.
- postgresqlReadonly StringGroup Id 
- ID of the resource.
- projectId Number
- Project ID.
- replayLag 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).
- replayLatency 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).
- securityGroups List<String>Ids 
- ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
- subnetId String
- VPC subnet ID.
- vpcId 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 tencentcloudTerraform Provider.