published on Friday, Aug 14, 2026 by tencentcloudstack
published on Friday, Aug 14, 2026 by tencentcloudstack
Provides a resource to create a PostgreSQL readonly instance V2.
Example Usage
Create a postpaid PostgreSQL readonly instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.PostgresqlReadonlyInstanceV2("example", {
zone: "ap-guangzhou-6",
masterDbInstanceId: "postgres-ckwcgdf1",
specCode: "pg.it.small2",
storage: 100,
vpcId: "vpc-lfnb8yyp",
subnetId: "subnet-csay7wfo",
instanceChargeType: "POSTPAID_BY_HOUR",
name: "tf-example",
projectId: 1269443,
readOnlyGroupId: "pgrogrp-h62yf0re",
deletionProtection: false,
securityGroupIds: [
"sg-n8zf5ry9",
"sg-rs32zv1r",
],
tags: {
createBy: "Terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.PostgresqlReadonlyInstanceV2("example",
zone="ap-guangzhou-6",
master_db_instance_id="postgres-ckwcgdf1",
spec_code="pg.it.small2",
storage=100,
vpc_id="vpc-lfnb8yyp",
subnet_id="subnet-csay7wfo",
instance_charge_type="POSTPAID_BY_HOUR",
name="tf-example",
project_id=1269443,
read_only_group_id="pgrogrp-h62yf0re",
deletion_protection=False,
security_group_ids=[
"sg-n8zf5ry9",
"sg-rs32zv1r",
],
tags={
"createBy": "Terraform",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewPostgresqlReadonlyInstanceV2(ctx, "example", &tencentcloud.PostgresqlReadonlyInstanceV2Args{
Zone: pulumi.String("ap-guangzhou-6"),
MasterDbInstanceId: pulumi.String("postgres-ckwcgdf1"),
SpecCode: pulumi.String("pg.it.small2"),
Storage: pulumi.Float64(100),
VpcId: pulumi.String("vpc-lfnb8yyp"),
SubnetId: pulumi.String("subnet-csay7wfo"),
InstanceChargeType: pulumi.String("POSTPAID_BY_HOUR"),
Name: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(1269443),
ReadOnlyGroupId: pulumi.String("pgrogrp-h62yf0re"),
DeletionProtection: pulumi.Bool(false),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("sg-n8zf5ry9"),
pulumi.String("sg-rs32zv1r"),
},
Tags: pulumi.StringMap{
"createBy": pulumi.String("Terraform"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.PostgresqlReadonlyInstanceV2("example", new()
{
Zone = "ap-guangzhou-6",
MasterDbInstanceId = "postgres-ckwcgdf1",
SpecCode = "pg.it.small2",
Storage = 100,
VpcId = "vpc-lfnb8yyp",
SubnetId = "subnet-csay7wfo",
InstanceChargeType = "POSTPAID_BY_HOUR",
Name = "tf-example",
ProjectId = 1269443,
ReadOnlyGroupId = "pgrogrp-h62yf0re",
DeletionProtection = false,
SecurityGroupIds = new[]
{
"sg-n8zf5ry9",
"sg-rs32zv1r",
},
Tags =
{
{ "createBy", "Terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlReadonlyInstanceV2;
import com.pulumi.tencentcloud.PostgresqlReadonlyInstanceV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PostgresqlReadonlyInstanceV2("example", PostgresqlReadonlyInstanceV2Args.builder()
.zone("ap-guangzhou-6")
.masterDbInstanceId("postgres-ckwcgdf1")
.specCode("pg.it.small2")
.storage(100.0)
.vpcId("vpc-lfnb8yyp")
.subnetId("subnet-csay7wfo")
.instanceChargeType("POSTPAID_BY_HOUR")
.name("tf-example")
.projectId(1269443.0)
.readOnlyGroupId("pgrogrp-h62yf0re")
.deletionProtection(false)
.securityGroupIds(
"sg-n8zf5ry9",
"sg-rs32zv1r")
.tags(Map.of("createBy", "Terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlReadonlyInstanceV2
properties:
zone: ap-guangzhou-6
masterDbInstanceId: postgres-ckwcgdf1
specCode: pg.it.small2
storage: 100
vpcId: vpc-lfnb8yyp
subnetId: subnet-csay7wfo
instanceChargeType: POSTPAID_BY_HOUR
name: tf-example
projectId: 1.269443e+06
readOnlyGroupId: pgrogrp-h62yf0re
deletionProtection: false
securityGroupIds:
- sg-n8zf5ry9
- sg-rs32zv1r
tags:
createBy: Terraform
Example coming soon!
Create a prepaid PostgreSQL readonly instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.PostgresqlReadonlyInstanceV2("example", {
zone: "ap-guangzhou-6",
masterDbInstanceId: "postgres-ckwcgdf1",
specCode: "pg.it.small2",
storage: 100,
vpcId: "vpc-lfnb8yyp",
subnetId: "subnet-csay7wfo",
instanceChargeType: "PREPAID",
period: 1,
autoRenewFlag: 1,
name: "tf-example",
projectId: 1269443,
readOnlyGroupId: "pgrogrp-h62yf0re",
deletionProtection: true,
securityGroupIds: [
"sg-n8zf5ry9",
"sg-8gbd3tj9",
"sg-rs32zv1r",
],
tags: {
createBy: "Terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.PostgresqlReadonlyInstanceV2("example",
zone="ap-guangzhou-6",
master_db_instance_id="postgres-ckwcgdf1",
spec_code="pg.it.small2",
storage=100,
vpc_id="vpc-lfnb8yyp",
subnet_id="subnet-csay7wfo",
instance_charge_type="PREPAID",
period=1,
auto_renew_flag=1,
name="tf-example",
project_id=1269443,
read_only_group_id="pgrogrp-h62yf0re",
deletion_protection=True,
security_group_ids=[
"sg-n8zf5ry9",
"sg-8gbd3tj9",
"sg-rs32zv1r",
],
tags={
"createBy": "Terraform",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewPostgresqlReadonlyInstanceV2(ctx, "example", &tencentcloud.PostgresqlReadonlyInstanceV2Args{
Zone: pulumi.String("ap-guangzhou-6"),
MasterDbInstanceId: pulumi.String("postgres-ckwcgdf1"),
SpecCode: pulumi.String("pg.it.small2"),
Storage: pulumi.Float64(100),
VpcId: pulumi.String("vpc-lfnb8yyp"),
SubnetId: pulumi.String("subnet-csay7wfo"),
InstanceChargeType: pulumi.String("PREPAID"),
Period: pulumi.Float64(1),
AutoRenewFlag: pulumi.Float64(1),
Name: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(1269443),
ReadOnlyGroupId: pulumi.String("pgrogrp-h62yf0re"),
DeletionProtection: pulumi.Bool(true),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("sg-n8zf5ry9"),
pulumi.String("sg-8gbd3tj9"),
pulumi.String("sg-rs32zv1r"),
},
Tags: pulumi.StringMap{
"createBy": pulumi.String("Terraform"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.PostgresqlReadonlyInstanceV2("example", new()
{
Zone = "ap-guangzhou-6",
MasterDbInstanceId = "postgres-ckwcgdf1",
SpecCode = "pg.it.small2",
Storage = 100,
VpcId = "vpc-lfnb8yyp",
SubnetId = "subnet-csay7wfo",
InstanceChargeType = "PREPAID",
Period = 1,
AutoRenewFlag = 1,
Name = "tf-example",
ProjectId = 1269443,
ReadOnlyGroupId = "pgrogrp-h62yf0re",
DeletionProtection = true,
SecurityGroupIds = new[]
{
"sg-n8zf5ry9",
"sg-8gbd3tj9",
"sg-rs32zv1r",
},
Tags =
{
{ "createBy", "Terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlReadonlyInstanceV2;
import com.pulumi.tencentcloud.PostgresqlReadonlyInstanceV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PostgresqlReadonlyInstanceV2("example", PostgresqlReadonlyInstanceV2Args.builder()
.zone("ap-guangzhou-6")
.masterDbInstanceId("postgres-ckwcgdf1")
.specCode("pg.it.small2")
.storage(100.0)
.vpcId("vpc-lfnb8yyp")
.subnetId("subnet-csay7wfo")
.instanceChargeType("PREPAID")
.period(1.0)
.autoRenewFlag(1.0)
.name("tf-example")
.projectId(1269443.0)
.readOnlyGroupId("pgrogrp-h62yf0re")
.deletionProtection(true)
.securityGroupIds(
"sg-n8zf5ry9",
"sg-8gbd3tj9",
"sg-rs32zv1r")
.tags(Map.of("createBy", "Terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlReadonlyInstanceV2
properties:
zone: ap-guangzhou-6
masterDbInstanceId: postgres-ckwcgdf1
specCode: pg.it.small2
storage: 100
vpcId: vpc-lfnb8yyp
subnetId: subnet-csay7wfo
instanceChargeType: PREPAID
period: 1
autoRenewFlag: 1
name: tf-example
projectId: 1.269443e+06
readOnlyGroupId: pgrogrp-h62yf0re
deletionProtection: true
securityGroupIds:
- sg-n8zf5ry9
- sg-8gbd3tj9
- sg-rs32zv1r
tags:
createBy: Terraform
Example coming soon!
Create PostgresqlReadonlyInstanceV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlReadonlyInstanceV2(name: string, args: PostgresqlReadonlyInstanceV2Args, opts?: CustomResourceOptions);@overload
def PostgresqlReadonlyInstanceV2(resource_name: str,
args: PostgresqlReadonlyInstanceV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlReadonlyInstanceV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
master_db_instance_id: Optional[str] = None,
zone: Optional[str] = None,
storage: Optional[float] = None,
spec_code: Optional[str] = None,
project_id: Optional[float] = None,
deletion_protection: Optional[bool] = None,
name: Optional[str] = None,
need_support_ipv6: Optional[float] = None,
period: Optional[float] = None,
postgresql_readonly_instance_v2_id: Optional[str] = None,
auto_renew_flag: Optional[float] = None,
read_only_group_id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
instance_charge_type: Optional[str] = None,
dedicated_cluster_id: Optional[str] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[PostgresqlReadonlyInstanceV2TimeoutsArgs] = None,
voucher_ids: Optional[Sequence[str]] = None,
vpc_id: Optional[str] = None,
auto_voucher: Optional[float] = None)func NewPostgresqlReadonlyInstanceV2(ctx *Context, name string, args PostgresqlReadonlyInstanceV2Args, opts ...ResourceOption) (*PostgresqlReadonlyInstanceV2, error)public PostgresqlReadonlyInstanceV2(string name, PostgresqlReadonlyInstanceV2Args args, CustomResourceOptions? opts = null)
public PostgresqlReadonlyInstanceV2(String name, PostgresqlReadonlyInstanceV2Args args)
public PostgresqlReadonlyInstanceV2(String name, PostgresqlReadonlyInstanceV2Args args, CustomResourceOptions options)
type: tencentcloud:PostgresqlReadonlyInstanceV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_postgresql_readonly_instance_v2" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PostgresqlReadonlyInstanceV2Args
- 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 PostgresqlReadonlyInstanceV2Args
- 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 PostgresqlReadonlyInstanceV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlReadonlyInstanceV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlReadonlyInstanceV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlReadonlyInstanceV2 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 PostgresqlReadonlyInstanceV2 resource accepts the following input properties:
- Master
Db stringInstance Id - ID of the primary instance to which the read-only replica belongs.
- Spec
Code string - Specification code, which can be obtained via DescribeClasses.
- Storage double
- Instance storage capacity in GB, the step is 10.
- Zone string
- Availability zone ID, such as ap-guangzhou-3.
- Auto
Renew doubleFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- Auto
Voucher double - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- Dedicated
Cluster stringId - Dedicated cluster ID.
- Deletion
Protection bool - Whether to enable deletion protection, true for enable, false for disable.
- Instance
Charge stringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- Name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- Need
Support doubleIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- Period double
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- Postgresql
Readonly stringInstance V2Id - ID of the resource.
- Project
Id double - Project ID. Default: 0, means default project.
- Read
Only stringGroup Id - Read-only group ID.
- Security
Group List<string>Ids - Security group IDs bound to the instance.
- Subnet
Id string - VPC subnet ID, such as subnet-xxxxxxxx.
- Dictionary<string, string>
- Instance tags.
- Timeouts
Postgresql
Readonly Instance V2Timeouts - Voucher
Ids List<string> - Voucher ID list, currently only one voucher is supported.
- Vpc
Id string - VPC ID, such as vpc-xxxxxxxx.
- Master
Db stringInstance Id - ID of the primary instance to which the read-only replica belongs.
- Spec
Code string - Specification code, which can be obtained via DescribeClasses.
- Storage float64
- Instance storage capacity in GB, the step is 10.
- Zone string
- Availability zone ID, such as ap-guangzhou-3.
- Auto
Renew float64Flag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- Auto
Voucher float64 - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- Dedicated
Cluster stringId - Dedicated cluster ID.
- Deletion
Protection bool - Whether to enable deletion protection, true for enable, false for disable.
- Instance
Charge stringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- Name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- Need
Support float64Ipv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- Period float64
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- Postgresql
Readonly stringInstance V2Id - ID of the resource.
- Project
Id float64 - Project ID. Default: 0, means default project.
- Read
Only stringGroup Id - Read-only group ID.
- Security
Group []stringIds - Security group IDs bound to the instance.
- Subnet
Id string - VPC subnet ID, such as subnet-xxxxxxxx.
- map[string]string
- Instance tags.
- Timeouts
Postgresql
Readonly Instance V2Timeouts Args - Voucher
Ids []string - Voucher ID list, currently only one voucher is supported.
- Vpc
Id string - VPC ID, such as vpc-xxxxxxxx.
- master_
db_ stringinstance_ id - ID of the primary instance to which the read-only replica belongs.
- spec_
code string - Specification code, which can be obtained via DescribeClasses.
- storage number
- Instance storage capacity in GB, the step is 10.
- zone string
- Availability zone ID, such as ap-guangzhou-3.
- auto_
renew_ numberflag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto_
voucher number - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- dedicated_
cluster_ stringid - Dedicated cluster ID.
- deletion_
protection bool - Whether to enable deletion protection, true for enable, false for disable.
- instance_
charge_ stringtype - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need_
support_ numberipv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period number
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql_
readonly_ stringinstance_ v2_ id - ID of the resource.
- project_
id number - Project ID. Default: 0, means default project.
- read_
only_ stringgroup_ id - Read-only group ID.
- security_
group_ list(string)ids - Security group IDs bound to the instance.
- subnet_
id string - VPC subnet ID, such as subnet-xxxxxxxx.
- map(string)
- Instance tags.
- timeouts object
- voucher_
ids list(string) - Voucher ID list, currently only one voucher is supported.
- vpc_
id string - VPC ID, such as vpc-xxxxxxxx.
- master
Db StringInstance Id - ID of the primary instance to which the read-only replica belongs.
- spec
Code String - Specification code, which can be obtained via DescribeClasses.
- storage Double
- Instance storage capacity in GB, the step is 10.
- zone String
- Availability zone ID, such as ap-guangzhou-3.
- auto
Renew DoubleFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto
Voucher Double - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- dedicated
Cluster StringId - Dedicated cluster ID.
- deletion
Protection Boolean - Whether to enable deletion protection, true for enable, false for disable.
- instance
Charge StringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- name String
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need
Support DoubleIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period Double
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql
Readonly StringInstance V2Id - ID of the resource.
- project
Id Double - Project ID. Default: 0, means default project.
- read
Only StringGroup Id - Read-only group ID.
- security
Group List<String>Ids - Security group IDs bound to the instance.
- subnet
Id String - VPC subnet ID, such as subnet-xxxxxxxx.
- Map<String,String>
- Instance tags.
- timeouts
Postgresql
Readonly Instance V2Timeouts - voucher
Ids List<String> - Voucher ID list, currently only one voucher is supported.
- vpc
Id String - VPC ID, such as vpc-xxxxxxxx.
- master
Db stringInstance Id - ID of the primary instance to which the read-only replica belongs.
- spec
Code string - Specification code, which can be obtained via DescribeClasses.
- storage number
- Instance storage capacity in GB, the step is 10.
- zone string
- Availability zone ID, such as ap-guangzhou-3.
- auto
Renew numberFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto
Voucher number - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- dedicated
Cluster stringId - Dedicated cluster ID.
- deletion
Protection boolean - Whether to enable deletion protection, true for enable, false for disable.
- instance
Charge stringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need
Support numberIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period number
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql
Readonly stringInstance V2Id - ID of the resource.
- project
Id number - Project ID. Default: 0, means default project.
- read
Only stringGroup Id - Read-only group ID.
- security
Group string[]Ids - Security group IDs bound to the instance.
- subnet
Id string - VPC subnet ID, such as subnet-xxxxxxxx.
- {[key: string]: string}
- Instance tags.
- timeouts
Postgresql
Readonly Instance V2Timeouts - voucher
Ids string[] - Voucher ID list, currently only one voucher is supported.
- vpc
Id string - VPC ID, such as vpc-xxxxxxxx.
- master_
db_ strinstance_ id - ID of the primary instance to which the read-only replica belongs.
- spec_
code str - Specification code, which can be obtained via DescribeClasses.
- storage float
- Instance storage capacity in GB, the step is 10.
- zone str
- Availability zone ID, such as ap-guangzhou-3.
- auto_
renew_ floatflag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto_
voucher float - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- dedicated_
cluster_ strid - Dedicated cluster ID.
- deletion_
protection bool - Whether to enable deletion protection, true for enable, false for disable.
- instance_
charge_ strtype - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- name str
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need_
support_ floatipv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period float
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql_
readonly_ strinstance_ v2_ id - ID of the resource.
- project_
id float - Project ID. Default: 0, means default project.
- read_
only_ strgroup_ id - Read-only group ID.
- security_
group_ Sequence[str]ids - Security group IDs bound to the instance.
- subnet_
id str - VPC subnet ID, such as subnet-xxxxxxxx.
- Mapping[str, str]
- Instance tags.
- timeouts
Postgresql
Readonly Instance V2Timeouts Args - voucher_
ids Sequence[str] - Voucher ID list, currently only one voucher is supported.
- vpc_
id str - VPC ID, such as vpc-xxxxxxxx.
- master
Db StringInstance Id - ID of the primary instance to which the read-only replica belongs.
- spec
Code String - Specification code, which can be obtained via DescribeClasses.
- storage Number
- Instance storage capacity in GB, the step is 10.
- zone String
- Availability zone ID, such as ap-guangzhou-3.
- auto
Renew NumberFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto
Voucher Number - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- dedicated
Cluster StringId - Dedicated cluster ID.
- deletion
Protection Boolean - Whether to enable deletion protection, true for enable, false for disable.
- instance
Charge StringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- name String
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need
Support NumberIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period Number
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql
Readonly StringInstance V2Id - ID of the resource.
- project
Id Number - Project ID. Default: 0, means default project.
- read
Only StringGroup Id - Read-only group ID.
- security
Group List<String>Ids - Security group IDs bound to the instance.
- subnet
Id String - VPC subnet ID, such as subnet-xxxxxxxx.
- Map<String>
- Instance tags.
- timeouts Property Map
- voucher
Ids List<String> - Voucher ID list, currently only one voucher is supported.
- vpc
Id String - VPC ID, such as vpc-xxxxxxxx.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlReadonlyInstanceV2 resource produces the following output properties:
- Cpu double
- DB instance CPU.
- Db
Instance stringId - Instance ID managed by this resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory double
- DB instance memory.
- Cpu float64
- DB instance CPU.
- Db
Instance stringId - Instance ID managed by this resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory float64
- DB instance memory.
- cpu number
- DB instance CPU.
- db_
instance_ stringid - Instance ID managed by this resource.
- id string
- The provider-assigned unique ID for this managed resource.
- memory number
- DB instance memory.
- cpu Double
- DB instance CPU.
- db
Instance StringId - Instance ID managed by this resource.
- id String
- The provider-assigned unique ID for this managed resource.
- memory Double
- DB instance memory.
- cpu number
- DB instance CPU.
- db
Instance stringId - Instance ID managed by this resource.
- id string
- The provider-assigned unique ID for this managed resource.
- memory number
- DB instance memory.
- cpu float
- DB instance CPU.
- db_
instance_ strid - Instance ID managed by this resource.
- id str
- The provider-assigned unique ID for this managed resource.
- memory float
- DB instance memory.
- cpu Number
- DB instance CPU.
- db
Instance StringId - Instance ID managed by this resource.
- id String
- The provider-assigned unique ID for this managed resource.
- memory Number
- DB instance memory.
Look up Existing PostgresqlReadonlyInstanceV2 Resource
Get an existing PostgresqlReadonlyInstanceV2 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?: PostgresqlReadonlyInstanceV2State, opts?: CustomResourceOptions): PostgresqlReadonlyInstanceV2@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_renew_flag: Optional[float] = None,
auto_voucher: Optional[float] = None,
cpu: Optional[float] = None,
db_instance_id: Optional[str] = None,
dedicated_cluster_id: Optional[str] = None,
deletion_protection: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
master_db_instance_id: Optional[str] = None,
memory: Optional[float] = None,
name: Optional[str] = None,
need_support_ipv6: Optional[float] = None,
period: Optional[float] = None,
postgresql_readonly_instance_v2_id: Optional[str] = None,
project_id: Optional[float] = None,
read_only_group_id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
spec_code: Optional[str] = None,
storage: Optional[float] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[PostgresqlReadonlyInstanceV2TimeoutsArgs] = None,
voucher_ids: Optional[Sequence[str]] = None,
vpc_id: Optional[str] = None,
zone: Optional[str] = None) -> PostgresqlReadonlyInstanceV2func GetPostgresqlReadonlyInstanceV2(ctx *Context, name string, id IDInput, state *PostgresqlReadonlyInstanceV2State, opts ...ResourceOption) (*PostgresqlReadonlyInstanceV2, error)public static PostgresqlReadonlyInstanceV2 Get(string name, Input<string> id, PostgresqlReadonlyInstanceV2State? state, CustomResourceOptions? opts = null)public static PostgresqlReadonlyInstanceV2 get(String name, Output<String> id, PostgresqlReadonlyInstanceV2State state, CustomResourceOptions options)resources: _: type: tencentcloud:PostgresqlReadonlyInstanceV2 get: id: ${id}import {
to = tencentcloud_postgresql_readonly_instance_v2.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Auto
Renew doubleFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- Auto
Voucher double - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- Cpu double
- DB instance CPU.
- Db
Instance stringId - Instance ID managed by this resource.
- Dedicated
Cluster stringId - Dedicated cluster ID.
- Deletion
Protection bool - Whether to enable deletion protection, true for enable, false for disable.
- Instance
Charge stringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- Master
Db stringInstance Id - ID of the primary instance to which the read-only replica belongs.
- Memory double
- DB instance memory.
- Name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- Need
Support doubleIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- Period double
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- Postgresql
Readonly stringInstance V2Id - ID of the resource.
- Project
Id double - Project ID. Default: 0, means default project.
- Read
Only stringGroup Id - Read-only group ID.
- Security
Group List<string>Ids - Security group IDs bound to the instance.
- Spec
Code string - Specification code, which can be obtained via DescribeClasses.
- Storage double
- Instance storage capacity in GB, the step is 10.
- Subnet
Id string - VPC subnet ID, such as subnet-xxxxxxxx.
- Dictionary<string, string>
- Instance tags.
- Timeouts
Postgresql
Readonly Instance V2Timeouts - Voucher
Ids List<string> - Voucher ID list, currently only one voucher is supported.
- Vpc
Id string - VPC ID, such as vpc-xxxxxxxx.
- Zone string
- Availability zone ID, such as ap-guangzhou-3.
- Auto
Renew float64Flag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- Auto
Voucher float64 - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- Cpu float64
- DB instance CPU.
- Db
Instance stringId - Instance ID managed by this resource.
- Dedicated
Cluster stringId - Dedicated cluster ID.
- Deletion
Protection bool - Whether to enable deletion protection, true for enable, false for disable.
- Instance
Charge stringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- Master
Db stringInstance Id - ID of the primary instance to which the read-only replica belongs.
- Memory float64
- DB instance memory.
- Name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- Need
Support float64Ipv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- Period float64
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- Postgresql
Readonly stringInstance V2Id - ID of the resource.
- Project
Id float64 - Project ID. Default: 0, means default project.
- Read
Only stringGroup Id - Read-only group ID.
- Security
Group []stringIds - Security group IDs bound to the instance.
- Spec
Code string - Specification code, which can be obtained via DescribeClasses.
- Storage float64
- Instance storage capacity in GB, the step is 10.
- Subnet
Id string - VPC subnet ID, such as subnet-xxxxxxxx.
- map[string]string
- Instance tags.
- Timeouts
Postgresql
Readonly Instance V2Timeouts Args - Voucher
Ids []string - Voucher ID list, currently only one voucher is supported.
- Vpc
Id string - VPC ID, such as vpc-xxxxxxxx.
- Zone string
- Availability zone ID, such as ap-guangzhou-3.
- auto_
renew_ numberflag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto_
voucher number - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- cpu number
- DB instance CPU.
- db_
instance_ stringid - Instance ID managed by this resource.
- dedicated_
cluster_ stringid - Dedicated cluster ID.
- deletion_
protection bool - Whether to enable deletion protection, true for enable, false for disable.
- instance_
charge_ stringtype - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- master_
db_ stringinstance_ id - ID of the primary instance to which the read-only replica belongs.
- memory number
- DB instance memory.
- name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need_
support_ numberipv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period number
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql_
readonly_ stringinstance_ v2_ id - ID of the resource.
- project_
id number - Project ID. Default: 0, means default project.
- read_
only_ stringgroup_ id - Read-only group ID.
- security_
group_ list(string)ids - Security group IDs bound to the instance.
- spec_
code string - Specification code, which can be obtained via DescribeClasses.
- storage number
- Instance storage capacity in GB, the step is 10.
- subnet_
id string - VPC subnet ID, such as subnet-xxxxxxxx.
- map(string)
- Instance tags.
- timeouts object
- voucher_
ids list(string) - Voucher ID list, currently only one voucher is supported.
- vpc_
id string - VPC ID, such as vpc-xxxxxxxx.
- zone string
- Availability zone ID, such as ap-guangzhou-3.
- auto
Renew DoubleFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto
Voucher Double - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- cpu Double
- DB instance CPU.
- db
Instance StringId - Instance ID managed by this resource.
- dedicated
Cluster StringId - Dedicated cluster ID.
- deletion
Protection Boolean - Whether to enable deletion protection, true for enable, false for disable.
- instance
Charge StringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- master
Db StringInstance Id - ID of the primary instance to which the read-only replica belongs.
- memory Double
- DB instance memory.
- name String
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need
Support DoubleIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period Double
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql
Readonly StringInstance V2Id - ID of the resource.
- project
Id Double - Project ID. Default: 0, means default project.
- read
Only StringGroup Id - Read-only group ID.
- security
Group List<String>Ids - Security group IDs bound to the instance.
- spec
Code String - Specification code, which can be obtained via DescribeClasses.
- storage Double
- Instance storage capacity in GB, the step is 10.
- subnet
Id String - VPC subnet ID, such as subnet-xxxxxxxx.
- Map<String,String>
- Instance tags.
- timeouts
Postgresql
Readonly Instance V2Timeouts - voucher
Ids List<String> - Voucher ID list, currently only one voucher is supported.
- vpc
Id String - VPC ID, such as vpc-xxxxxxxx.
- zone String
- Availability zone ID, such as ap-guangzhou-3.
- auto
Renew numberFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto
Voucher number - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- cpu number
- DB instance CPU.
- db
Instance stringId - Instance ID managed by this resource.
- dedicated
Cluster stringId - Dedicated cluster ID.
- deletion
Protection boolean - Whether to enable deletion protection, true for enable, false for disable.
- instance
Charge stringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- master
Db stringInstance Id - ID of the primary instance to which the read-only replica belongs.
- memory number
- DB instance memory.
- name string
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need
Support numberIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period number
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql
Readonly stringInstance V2Id - ID of the resource.
- project
Id number - Project ID. Default: 0, means default project.
- read
Only stringGroup Id - Read-only group ID.
- security
Group string[]Ids - Security group IDs bound to the instance.
- spec
Code string - Specification code, which can be obtained via DescribeClasses.
- storage number
- Instance storage capacity in GB, the step is 10.
- subnet
Id string - VPC subnet ID, such as subnet-xxxxxxxx.
- {[key: string]: string}
- Instance tags.
- timeouts
Postgresql
Readonly Instance V2Timeouts - voucher
Ids string[] - Voucher ID list, currently only one voucher is supported.
- vpc
Id string - VPC ID, such as vpc-xxxxxxxx.
- zone string
- Availability zone ID, such as ap-guangzhou-3.
- auto_
renew_ floatflag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto_
voucher float - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- cpu float
- DB instance CPU.
- db_
instance_ strid - Instance ID managed by this resource.
- dedicated_
cluster_ strid - Dedicated cluster ID.
- deletion_
protection bool - Whether to enable deletion protection, true for enable, false for disable.
- instance_
charge_ strtype - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- master_
db_ strinstance_ id - ID of the primary instance to which the read-only replica belongs.
- memory float
- DB instance memory.
- name str
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need_
support_ floatipv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period float
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql_
readonly_ strinstance_ v2_ id - ID of the resource.
- project_
id float - Project ID. Default: 0, means default project.
- read_
only_ strgroup_ id - Read-only group ID.
- security_
group_ Sequence[str]ids - Security group IDs bound to the instance.
- spec_
code str - Specification code, which can be obtained via DescribeClasses.
- storage float
- Instance storage capacity in GB, the step is 10.
- subnet_
id str - VPC subnet ID, such as subnet-xxxxxxxx.
- Mapping[str, str]
- Instance tags.
- timeouts
Postgresql
Readonly Instance V2Timeouts Args - voucher_
ids Sequence[str] - Voucher ID list, currently only one voucher is supported.
- vpc_
id str - VPC ID, such as vpc-xxxxxxxx.
- zone str
- Availability zone ID, such as ap-guangzhou-3.
- auto
Renew NumberFlag - Auto renew flag, 0 for manual renew, 1 for auto renew. Default: 0. Only supports PREPAID.
- auto
Voucher Number - Whether to use voucher automatically, 1 for yes, 0 for no. Default: 0.
- cpu Number
- DB instance CPU.
- db
Instance StringId - Instance ID managed by this resource.
- dedicated
Cluster StringId - Dedicated cluster ID.
- deletion
Protection Boolean - Whether to enable deletion protection, true for enable, false for disable.
- instance
Charge StringType - Instance billing mode. Valid values: PREPAID, POSTPAID_BY_HOUR. Default: PREPAID.
- master
Db StringInstance Id - ID of the primary instance to which the read-only replica belongs.
- memory Number
- DB instance memory.
- name String
- Instance name, only supports chinese/english/numbers/_/- with length less than 60.
- need
Support NumberIpv6 - Whether to support IPv6 access, 1 for yes, 0 for no. Default: 0.
- period Number
- Purchase duration in months. PREPAID supports 1,2,3,4,5,6,7,8,9,10,11,12,24,36; POSTPAID only supports 1.
- postgresql
Readonly StringInstance V2Id - ID of the resource.
- project
Id Number - Project ID. Default: 0, means default project.
- read
Only StringGroup Id - Read-only group ID.
- security
Group List<String>Ids - Security group IDs bound to the instance.
- spec
Code String - Specification code, which can be obtained via DescribeClasses.
- storage Number
- Instance storage capacity in GB, the step is 10.
- subnet
Id String - VPC subnet ID, such as subnet-xxxxxxxx.
- Map<String>
- Instance tags.
- timeouts Property Map
- voucher
Ids List<String> - Voucher ID list, currently only one voucher is supported.
- vpc
Id String - VPC ID, such as vpc-xxxxxxxx.
- zone String
- Availability zone ID, such as ap-guangzhou-3.
Supporting Types
PostgresqlReadonlyInstanceV2Timeouts, PostgresqlReadonlyInstanceV2TimeoutsArgs
Import
PostgreSQL readonly instance V2 can be imported using the id, e.g.
$ pulumi import tencentcloud:index/postgresqlReadonlyInstanceV2:PostgresqlReadonlyInstanceV2 example pgro-gr4od5iw
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.
published on Friday, Aug 14, 2026 by tencentcloudstack