1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. PostgresqlInstance
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.PostgresqlInstance

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this resource to create postgresql instance.

    Note: To update the charge type, please update the charge_type and specify the period for the charging period. It only supports updating from POSTPAID_BY_HOUR to PREPAID, and the period field only valid in that upgrading case.

    Note: If no values are set for the parameters: db_kernel_version, db_major_version and engine_version, then engine_version is set to 10.4 by default. Suggest using parameter db_major_version to create an instance

    Note: If you need to upgrade the database version, Please use data source tencentcloud.getPostgresqlDbVersions to obtain the valid version value for db_kernel_version, db_major_version and engine_version. And when modifying, db_kernel_version, db_major_version and engine_version must be set.

    Note: If upgrade db_kernel_version, will synchronize the upgrade of the read-only instance version; If upgrade db_major_version, cannot have read-only instances.

    Example Usage

    Create a postgresql instance

    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 example = new tencentcloud.PostgresqlInstance("example", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        dbMajorVersion: "10",
        engineVersion: "10.23",
        rootUser: "root123",
        rootPassword: "Root123$",
        charset: "UTF8",
        projectId: 0,
        cpu: 1,
        memory: 2,
        storage: 10,
        tags: {
            CreateBy: "Terraform",
        },
    });
    
    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 = tencentcloud.PostgresqlInstance("example",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        db_major_version="10",
        engine_version="10.23",
        root_user="root123",
        root_password="Root123$",
        charset="UTF8",
        project_id=0,
        cpu=1,
        memory=2,
        storage=10,
        tags={
            "CreateBy": "Terraform",
        })
    
    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
    		_, err = tencentcloud.NewPostgresqlInstance(ctx, "example", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			DbMajorVersion:   pulumi.String("10"),
    			EngineVersion:    pulumi.String("10.23"),
    			RootUser:         pulumi.String("root123"),
    			RootPassword:     pulumi.String("Root123$"),
    			Charset:          pulumi.String("UTF8"),
    			ProjectId:        pulumi.Float64(0),
    			Cpu:              pulumi.Float64(1),
    			Memory:           pulumi.Float64(2),
    			Storage:          pulumi.Float64(10),
    			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 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 example = new Tencentcloud.PostgresqlInstance("example", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            DbMajorVersion = "10",
            EngineVersion = "10.23",
            RootUser = "root123",
            RootPassword = "Root123$",
            Charset = "UTF8",
            ProjectId = 0,
            Cpu = 1,
            Memory = 2,
            Storage = 10,
            Tags = 
            {
                { "CreateBy", "Terraform" },
            },
        });
    
    });
    
    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 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 example = new PostgresqlInstance("example", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .dbMajorVersion("10")
                .engineVersion("10.23")
                .rootUser("root123")
                .rootPassword("Root123$")
                .charset("UTF8")
                .projectId(0)
                .cpu(1)
                .memory(2)
                .storage(10)
                .tags(Map.of("CreateBy", "Terraform"))
                .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
      example:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          dbMajorVersion: '10'
          engineVersion: '10.23'
          rootUser: root123
          rootPassword: Root123$
          charset: UTF8
          projectId: 0
          cpu: 1
          memory: 2
          storage: 10
          tags:
            CreateBy: Terraform
    

    Create a postgresql instance with delete protection

    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 example = new tencentcloud.PostgresqlInstance("example", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        dbMajorVersion: "10",
        engineVersion: "10.23",
        rootUser: "root123",
        rootPassword: "Root123$",
        charset: "UTF8",
        projectId: 0,
        cpu: 1,
        memory: 2,
        storage: 10,
        deleteProtection: true,
        tags: {
            CreateBy: "Terraform",
        },
    });
    
    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 = tencentcloud.PostgresqlInstance("example",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        db_major_version="10",
        engine_version="10.23",
        root_user="root123",
        root_password="Root123$",
        charset="UTF8",
        project_id=0,
        cpu=1,
        memory=2,
        storage=10,
        delete_protection=True,
        tags={
            "CreateBy": "Terraform",
        })
    
    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
    		_, err = tencentcloud.NewPostgresqlInstance(ctx, "example", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			DbMajorVersion:   pulumi.String("10"),
    			EngineVersion:    pulumi.String("10.23"),
    			RootUser:         pulumi.String("root123"),
    			RootPassword:     pulumi.String("Root123$"),
    			Charset:          pulumi.String("UTF8"),
    			ProjectId:        pulumi.Float64(0),
    			Cpu:              pulumi.Float64(1),
    			Memory:           pulumi.Float64(2),
    			Storage:          pulumi.Float64(10),
    			DeleteProtection: pulumi.Bool(true),
    			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 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 example = new Tencentcloud.PostgresqlInstance("example", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            DbMajorVersion = "10",
            EngineVersion = "10.23",
            RootUser = "root123",
            RootPassword = "Root123$",
            Charset = "UTF8",
            ProjectId = 0,
            Cpu = 1,
            Memory = 2,
            Storage = 10,
            DeleteProtection = true,
            Tags = 
            {
                { "CreateBy", "Terraform" },
            },
        });
    
    });
    
    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 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 example = new PostgresqlInstance("example", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .dbMajorVersion("10")
                .engineVersion("10.23")
                .rootUser("root123")
                .rootPassword("Root123$")
                .charset("UTF8")
                .projectId(0)
                .cpu(1)
                .memory(2)
                .storage(10)
                .deleteProtection(true)
                .tags(Map.of("CreateBy", "Terraform"))
                .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
      example:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          dbMajorVersion: '10'
          engineVersion: '10.23'
          rootUser: root123
          rootPassword: Root123$
          charset: UTF8
          projectId: 0
          cpu: 1
          memory: 2
          storage: 10
          deleteProtection: true
          tags:
            CreateBy: Terraform
    

    Create a multi available zone postgresql instance

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-6";
    const standbyAvailabilityZone = config.get("standbyAvailabilityZone") || "ap-guangzhou-7";
    // 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 example = new tencentcloud.PostgresqlInstance("example", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        dbMajorVersion: "10",
        rootUser: "root123",
        rootPassword: "Root123$",
        charset: "UTF8",
        projectId: 0,
        memory: 2,
        cpu: 1,
        storage: 10,
        dbNodeSets: [
            {
                role: "Primary",
                zone: availabilityZone,
            },
            {
                zone: standbyAvailabilityZone,
            },
        ],
        tags: {
            CreateBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-6"
    standby_availability_zone = config.get("standbyAvailabilityZone")
    if standby_availability_zone is None:
        standby_availability_zone = "ap-guangzhou-7"
    # 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 = tencentcloud.PostgresqlInstance("example",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        db_major_version="10",
        root_user="root123",
        root_password="Root123$",
        charset="UTF8",
        project_id=0,
        memory=2,
        cpu=1,
        storage=10,
        db_node_sets=[
            {
                "role": "Primary",
                "zone": availability_zone,
            },
            {
                "zone": standby_availability_zone,
            },
        ],
        tags={
            "CreateBy": "Terraform",
        })
    
    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-6"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		standbyAvailabilityZone := "ap-guangzhou-7"
    		if param := cfg.Get("standbyAvailabilityZone"); param != "" {
    			standbyAvailabilityZone = 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
    		_, err = tencentcloud.NewPostgresqlInstance(ctx, "example", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			DbMajorVersion:   pulumi.String("10"),
    			RootUser:         pulumi.String("root123"),
    			RootPassword:     pulumi.String("Root123$"),
    			Charset:          pulumi.String("UTF8"),
    			ProjectId:        pulumi.Float64(0),
    			Memory:           pulumi.Float64(2),
    			Cpu:              pulumi.Float64(1),
    			Storage:          pulumi.Float64(10),
    			DbNodeSets: tencentcloud.PostgresqlInstanceDbNodeSetArray{
    				&tencentcloud.PostgresqlInstanceDbNodeSetArgs{
    					Role: pulumi.String("Primary"),
    					Zone: pulumi.String(availabilityZone),
    				},
    				&tencentcloud.PostgresqlInstanceDbNodeSetArgs{
    					Zone: pulumi.String(standbyAvailabilityZone),
    				},
    			},
    			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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-6";
        var standbyAvailabilityZone = config.Get("standbyAvailabilityZone") ?? "ap-guangzhou-7";
        // 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 example = new Tencentcloud.PostgresqlInstance("example", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            DbMajorVersion = "10",
            RootUser = "root123",
            RootPassword = "Root123$",
            Charset = "UTF8",
            ProjectId = 0,
            Memory = 2,
            Cpu = 1,
            Storage = 10,
            DbNodeSets = new[]
            {
                new Tencentcloud.Inputs.PostgresqlInstanceDbNodeSetArgs
                {
                    Role = "Primary",
                    Zone = availabilityZone,
                },
                new Tencentcloud.Inputs.PostgresqlInstanceDbNodeSetArgs
                {
                    Zone = standbyAvailabilityZone,
                },
            },
            Tags = 
            {
                { "CreateBy", "Terraform" },
            },
        });
    
    });
    
    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.inputs.PostgresqlInstanceDbNodeSetArgs;
    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-6");
            final var standbyAvailabilityZone = config.get("standbyAvailabilityZone").orElse("ap-guangzhou-7");
            // 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 example = new PostgresqlInstance("example", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .dbMajorVersion("10")
                .rootUser("root123")
                .rootPassword("Root123$")
                .charset("UTF8")
                .projectId(0)
                .memory(2)
                .cpu(1)
                .storage(10)
                .dbNodeSets(            
                    PostgresqlInstanceDbNodeSetArgs.builder()
                        .role("Primary")
                        .zone(availabilityZone)
                        .build(),
                    PostgresqlInstanceDbNodeSetArgs.builder()
                        .zone(standbyAvailabilityZone)
                        .build())
                .tags(Map.of("CreateBy", "Terraform"))
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-6
      standbyAvailabilityZone:
        type: string
        default: ap-guangzhou-7
    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
      example:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          dbMajorVersion: '10'
          rootUser: root123
          rootPassword: Root123$
          charset: UTF8
          projectId: 0
          memory: 2
          cpu: 1
          storage: 10
          dbNodeSets:
            - role: Primary
              zone: ${availabilityZone}
            - zone: ${standbyAvailabilityZone}
          tags:
            CreateBy: Terraform
    

    Create a multi available zone postgresql instance of CDC

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
    // 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 example = new tencentcloud.PostgresqlInstance("example", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        dbMajorVersion: "10",
        rootUser: "root123",
        rootPassword: "Root123$",
        charset: "UTF8",
        projectId: 0,
        memory: 2,
        cpu: 1,
        storage: 10,
        dbNodeSets: [
            {
                role: "Primary",
                zone: availabilityZone,
                dedicatedClusterId: "cluster-262n63e8",
            },
            {
                zone: availabilityZone,
                dedicatedClusterId: "cluster-262n63e8",
            },
        ],
        tags: {
            CreateBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-4"
    # 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 = tencentcloud.PostgresqlInstance("example",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        db_major_version="10",
        root_user="root123",
        root_password="Root123$",
        charset="UTF8",
        project_id=0,
        memory=2,
        cpu=1,
        storage=10,
        db_node_sets=[
            {
                "role": "Primary",
                "zone": availability_zone,
                "dedicated_cluster_id": "cluster-262n63e8",
            },
            {
                "zone": availability_zone,
                "dedicated_cluster_id": "cluster-262n63e8",
            },
        ],
        tags={
            "CreateBy": "Terraform",
        })
    
    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-4"
    		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
    		_, err = tencentcloud.NewPostgresqlInstance(ctx, "example", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			DbMajorVersion:   pulumi.String("10"),
    			RootUser:         pulumi.String("root123"),
    			RootPassword:     pulumi.String("Root123$"),
    			Charset:          pulumi.String("UTF8"),
    			ProjectId:        pulumi.Float64(0),
    			Memory:           pulumi.Float64(2),
    			Cpu:              pulumi.Float64(1),
    			Storage:          pulumi.Float64(10),
    			DbNodeSets: tencentcloud.PostgresqlInstanceDbNodeSetArray{
    				&tencentcloud.PostgresqlInstanceDbNodeSetArgs{
    					Role:               pulumi.String("Primary"),
    					Zone:               pulumi.String(availabilityZone),
    					DedicatedClusterId: pulumi.String("cluster-262n63e8"),
    				},
    				&tencentcloud.PostgresqlInstanceDbNodeSetArgs{
    					Zone:               pulumi.String(availabilityZone),
    					DedicatedClusterId: pulumi.String("cluster-262n63e8"),
    				},
    			},
    			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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
        // 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 example = new Tencentcloud.PostgresqlInstance("example", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            DbMajorVersion = "10",
            RootUser = "root123",
            RootPassword = "Root123$",
            Charset = "UTF8",
            ProjectId = 0,
            Memory = 2,
            Cpu = 1,
            Storage = 10,
            DbNodeSets = new[]
            {
                new Tencentcloud.Inputs.PostgresqlInstanceDbNodeSetArgs
                {
                    Role = "Primary",
                    Zone = availabilityZone,
                    DedicatedClusterId = "cluster-262n63e8",
                },
                new Tencentcloud.Inputs.PostgresqlInstanceDbNodeSetArgs
                {
                    Zone = availabilityZone,
                    DedicatedClusterId = "cluster-262n63e8",
                },
            },
            Tags = 
            {
                { "CreateBy", "Terraform" },
            },
        });
    
    });
    
    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.inputs.PostgresqlInstanceDbNodeSetArgs;
    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-4");
            // 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 example = new PostgresqlInstance("example", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .dbMajorVersion("10")
                .rootUser("root123")
                .rootPassword("Root123$")
                .charset("UTF8")
                .projectId(0)
                .memory(2)
                .cpu(1)
                .storage(10)
                .dbNodeSets(            
                    PostgresqlInstanceDbNodeSetArgs.builder()
                        .role("Primary")
                        .zone(availabilityZone)
                        .dedicatedClusterId("cluster-262n63e8")
                        .build(),
                    PostgresqlInstanceDbNodeSetArgs.builder()
                        .zone(availabilityZone)
                        .dedicatedClusterId("cluster-262n63e8")
                        .build())
                .tags(Map.of("CreateBy", "Terraform"))
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-4
    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
      example:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          dbMajorVersion: '10'
          rootUser: root123
          rootPassword: Root123$
          charset: UTF8
          projectId: 0
          memory: 2
          cpu: 1
          storage: 10
          dbNodeSets:
            - role: Primary
              zone: ${availabilityZone}
              dedicatedClusterId: cluster-262n63e8
            - zone: ${availabilityZone}
              dedicatedClusterId: cluster-262n63e8
          tags:
            CreateBy: Terraform
    

    Create pgsql with kms key

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-6";
    const example = new tencentcloud.PostgresqlInstance("example", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: "vpc-86v957zb",
        subnetId: "subnet-enm92y0m",
        dbMajorVersion: "11",
        engineVersion: "11.12",
        dbKernelVersion: "v11.12_r1.3",
        needSupportTde: 1,
        kmsKeyId: "788c606a-c7b7-11ec-82d1-5254001e5c4e",
        kmsRegion: "ap-guangzhou",
        rootPassword: "Root123$",
        charset: "LATIN1",
        projectId: 0,
        memory: 4,
        storage: 100,
        backupPlan: {
            minBackupStartTime: "00:10:11",
            maxBackupStartTime: "01:10:11",
            baseBackupRetentionPeriod: 7,
            backupPeriods: [
                "tuesday",
                "wednesday",
            ],
        },
        tags: {
            CreateBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-6"
    example = tencentcloud.PostgresqlInstance("example",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id="vpc-86v957zb",
        subnet_id="subnet-enm92y0m",
        db_major_version="11",
        engine_version="11.12",
        db_kernel_version="v11.12_r1.3",
        need_support_tde=1,
        kms_key_id="788c606a-c7b7-11ec-82d1-5254001e5c4e",
        kms_region="ap-guangzhou",
        root_password="Root123$",
        charset="LATIN1",
        project_id=0,
        memory=4,
        storage=100,
        backup_plan={
            "min_backup_start_time": "00:10:11",
            "max_backup_start_time": "01:10:11",
            "base_backup_retention_period": 7,
            "backup_periods": [
                "tuesday",
                "wednesday",
            ],
        },
        tags={
            "CreateBy": "Terraform",
        })
    
    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-6"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		_, err := tencentcloud.NewPostgresqlInstance(ctx, "example", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            pulumi.String("vpc-86v957zb"),
    			SubnetId:         pulumi.String("subnet-enm92y0m"),
    			DbMajorVersion:   pulumi.String("11"),
    			EngineVersion:    pulumi.String("11.12"),
    			DbKernelVersion:  pulumi.String("v11.12_r1.3"),
    			NeedSupportTde:   pulumi.Float64(1),
    			KmsKeyId:         pulumi.String("788c606a-c7b7-11ec-82d1-5254001e5c4e"),
    			KmsRegion:        pulumi.String("ap-guangzhou"),
    			RootPassword:     pulumi.String("Root123$"),
    			Charset:          pulumi.String("LATIN1"),
    			ProjectId:        pulumi.Float64(0),
    			Memory:           pulumi.Float64(4),
    			Storage:          pulumi.Float64(100),
    			BackupPlan: &tencentcloud.PostgresqlInstanceBackupPlanArgs{
    				MinBackupStartTime:        pulumi.String("00:10:11"),
    				MaxBackupStartTime:        pulumi.String("01:10:11"),
    				BaseBackupRetentionPeriod: pulumi.Float64(7),
    				BackupPeriods: pulumi.StringArray{
    					pulumi.String("tuesday"),
    					pulumi.String("wednesday"),
    				},
    			},
    			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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-6";
        var example = new Tencentcloud.PostgresqlInstance("example", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = "vpc-86v957zb",
            SubnetId = "subnet-enm92y0m",
            DbMajorVersion = "11",
            EngineVersion = "11.12",
            DbKernelVersion = "v11.12_r1.3",
            NeedSupportTde = 1,
            KmsKeyId = "788c606a-c7b7-11ec-82d1-5254001e5c4e",
            KmsRegion = "ap-guangzhou",
            RootPassword = "Root123$",
            Charset = "LATIN1",
            ProjectId = 0,
            Memory = 4,
            Storage = 100,
            BackupPlan = new Tencentcloud.Inputs.PostgresqlInstanceBackupPlanArgs
            {
                MinBackupStartTime = "00:10:11",
                MaxBackupStartTime = "01:10:11",
                BaseBackupRetentionPeriod = 7,
                BackupPeriods = new[]
                {
                    "tuesday",
                    "wednesday",
                },
            },
            Tags = 
            {
                { "CreateBy", "Terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlInstance;
    import com.pulumi.tencentcloud.PostgresqlInstanceArgs;
    import com.pulumi.tencentcloud.inputs.PostgresqlInstanceBackupPlanArgs;
    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-6");
            var example = new PostgresqlInstance("example", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId("vpc-86v957zb")
                .subnetId("subnet-enm92y0m")
                .dbMajorVersion("11")
                .engineVersion("11.12")
                .dbKernelVersion("v11.12_r1.3")
                .needSupportTde(1)
                .kmsKeyId("788c606a-c7b7-11ec-82d1-5254001e5c4e")
                .kmsRegion("ap-guangzhou")
                .rootPassword("Root123$")
                .charset("LATIN1")
                .projectId(0)
                .memory(4)
                .storage(100)
                .backupPlan(PostgresqlInstanceBackupPlanArgs.builder()
                    .minBackupStartTime("00:10:11")
                    .maxBackupStartTime("01:10:11")
                    .baseBackupRetentionPeriod(7)
                    .backupPeriods(                
                        "tuesday",
                        "wednesday")
                    .build())
                .tags(Map.of("CreateBy", "Terraform"))
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-6
    resources:
      example:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: vpc-86v957zb
          subnetId: subnet-enm92y0m
          dbMajorVersion: '11'
          engineVersion: '11.12'
          dbKernelVersion: v11.12_r1.3
          needSupportTde: 1
          kmsKeyId: 788c606a-c7b7-11ec-82d1-5254001e5c4e
          kmsRegion: ap-guangzhou
          rootPassword: Root123$
          charset: LATIN1
          projectId: 0
          memory: 4
          storage: 100
          backupPlan:
            minBackupStartTime: 00:10:11
            maxBackupStartTime: 01:10:11
            baseBackupRetentionPeriod: 7
            backupPeriods:
              - tuesday
              - wednesday
          tags:
            CreateBy: Terraform
    

    Upgrade kernel version

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-6";
    const example = new tencentcloud.PostgresqlInstance("example", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: "vpc-86v957zb",
        subnetId: "subnet-enm92y0m",
        engineVersion: "13.3",
        dbKernelVersion: "v13.3_r1.4",
        dbMajorVersion: "13",
        rootPassword: "Root123$",
        charset: "LATIN1",
        projectId: 0,
        publicAccessSwitch: false,
        securityGroups: ["sg-cm7fbbf3"],
        memory: 4,
        storage: 250,
        backupPlan: {
            minBackupStartTime: "01:10:11",
            maxBackupStartTime: "02:10:11",
            baseBackupRetentionPeriod: 5,
            backupPeriods: [
                "monday",
                "thursday",
                "sunday",
            ],
        },
        tags: {
            CreateBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-6"
    example = tencentcloud.PostgresqlInstance("example",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id="vpc-86v957zb",
        subnet_id="subnet-enm92y0m",
        engine_version="13.3",
        db_kernel_version="v13.3_r1.4",
        db_major_version="13",
        root_password="Root123$",
        charset="LATIN1",
        project_id=0,
        public_access_switch=False,
        security_groups=["sg-cm7fbbf3"],
        memory=4,
        storage=250,
        backup_plan={
            "min_backup_start_time": "01:10:11",
            "max_backup_start_time": "02:10:11",
            "base_backup_retention_period": 5,
            "backup_periods": [
                "monday",
                "thursday",
                "sunday",
            ],
        },
        tags={
            "CreateBy": "Terraform",
        })
    
    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-6"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		_, err := tencentcloud.NewPostgresqlInstance(ctx, "example", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone:   pulumi.String(availabilityZone),
    			ChargeType:         pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:              pulumi.String("vpc-86v957zb"),
    			SubnetId:           pulumi.String("subnet-enm92y0m"),
    			EngineVersion:      pulumi.String("13.3"),
    			DbKernelVersion:    pulumi.String("v13.3_r1.4"),
    			DbMajorVersion:     pulumi.String("13"),
    			RootPassword:       pulumi.String("Root123$"),
    			Charset:            pulumi.String("LATIN1"),
    			ProjectId:          pulumi.Float64(0),
    			PublicAccessSwitch: pulumi.Bool(false),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("sg-cm7fbbf3"),
    			},
    			Memory:  pulumi.Float64(4),
    			Storage: pulumi.Float64(250),
    			BackupPlan: &tencentcloud.PostgresqlInstanceBackupPlanArgs{
    				MinBackupStartTime:        pulumi.String("01:10:11"),
    				MaxBackupStartTime:        pulumi.String("02:10:11"),
    				BaseBackupRetentionPeriod: pulumi.Float64(5),
    				BackupPeriods: pulumi.StringArray{
    					pulumi.String("monday"),
    					pulumi.String("thursday"),
    					pulumi.String("sunday"),
    				},
    			},
    			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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-6";
        var example = new Tencentcloud.PostgresqlInstance("example", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = "vpc-86v957zb",
            SubnetId = "subnet-enm92y0m",
            EngineVersion = "13.3",
            DbKernelVersion = "v13.3_r1.4",
            DbMajorVersion = "13",
            RootPassword = "Root123$",
            Charset = "LATIN1",
            ProjectId = 0,
            PublicAccessSwitch = false,
            SecurityGroups = new[]
            {
                "sg-cm7fbbf3",
            },
            Memory = 4,
            Storage = 250,
            BackupPlan = new Tencentcloud.Inputs.PostgresqlInstanceBackupPlanArgs
            {
                MinBackupStartTime = "01:10:11",
                MaxBackupStartTime = "02:10:11",
                BaseBackupRetentionPeriod = 5,
                BackupPeriods = new[]
                {
                    "monday",
                    "thursday",
                    "sunday",
                },
            },
            Tags = 
            {
                { "CreateBy", "Terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlInstance;
    import com.pulumi.tencentcloud.PostgresqlInstanceArgs;
    import com.pulumi.tencentcloud.inputs.PostgresqlInstanceBackupPlanArgs;
    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-6");
            var example = new PostgresqlInstance("example", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId("vpc-86v957zb")
                .subnetId("subnet-enm92y0m")
                .engineVersion("13.3")
                .dbKernelVersion("v13.3_r1.4")
                .dbMajorVersion("13")
                .rootPassword("Root123$")
                .charset("LATIN1")
                .projectId(0)
                .publicAccessSwitch(false)
                .securityGroups("sg-cm7fbbf3")
                .memory(4)
                .storage(250)
                .backupPlan(PostgresqlInstanceBackupPlanArgs.builder()
                    .minBackupStartTime("01:10:11")
                    .maxBackupStartTime("02:10:11")
                    .baseBackupRetentionPeriod(5)
                    .backupPeriods(                
                        "monday",
                        "thursday",
                        "sunday")
                    .build())
                .tags(Map.of("CreateBy", "Terraform"))
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-6
    resources:
      example:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: vpc-86v957zb
          subnetId: subnet-enm92y0m
          engineVersion: '13.3'
          dbKernelVersion: v13.3_r1.4
          # eg:from v13.3_r1.1 to v13.3_r1.4
          dbMajorVersion: '13'
          rootPassword: Root123$
          charset: LATIN1
          projectId: 0
          publicAccessSwitch: false
          securityGroups:
            - sg-cm7fbbf3
          memory: 4
          storage: 250
          backupPlan:
            minBackupStartTime: 01:10:11
            maxBackupStartTime: 02:10:11
            baseBackupRetentionPeriod: 5
            backupPeriods:
              - monday
              - thursday
              - sunday
          tags:
            CreateBy: Terraform
    

    Create PostgresqlInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PostgresqlInstance(name: string, args: PostgresqlInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresqlInstance(resource_name: str,
                           args: PostgresqlInstanceArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresqlInstance(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           memory: Optional[float] = None,
                           vpc_id: Optional[str] = None,
                           availability_zone: Optional[str] = None,
                           subnet_id: Optional[str] = None,
                           storage: Optional[float] = None,
                           root_password: Optional[str] = None,
                           max_standby_archive_delay: Optional[float] = None,
                           name: Optional[str] = None,
                           db_major_version: Optional[str] = None,
                           db_major_vesion: Optional[str] = None,
                           db_node_sets: Optional[Sequence[PostgresqlInstanceDbNodeSetArgs]] = None,
                           delete_protection: Optional[bool] = None,
                           engine_version: Optional[str] = None,
                           kms_cluster_id: Optional[str] = None,
                           kms_key_id: Optional[str] = None,
                           kms_region: Optional[str] = None,
                           auto_renew_flag: Optional[float] = None,
                           max_standby_streaming_delay: Optional[float] = None,
                           cpu: Optional[float] = None,
                           db_kernel_version: Optional[str] = None,
                           need_support_tde: Optional[float] = None,
                           period: Optional[float] = None,
                           postgresql_instance_id: Optional[str] = None,
                           project_id: Optional[float] = None,
                           public_access_switch: Optional[bool] = None,
                           charset: Optional[str] = None,
                           root_user: Optional[str] = None,
                           security_groups: Optional[Sequence[str]] = None,
                           charge_type: Optional[str] = None,
                           backup_plan: Optional[PostgresqlInstanceBackupPlanArgs] = None,
                           tags: Optional[Mapping[str, str]] = None,
                           voucher_ids: Optional[Sequence[str]] = None,
                           auto_voucher: Optional[float] = None,
                           wait_switch: Optional[float] = None)
    func NewPostgresqlInstance(ctx *Context, name string, args PostgresqlInstanceArgs, opts ...ResourceOption) (*PostgresqlInstance, error)
    public PostgresqlInstance(string name, PostgresqlInstanceArgs args, CustomResourceOptions? opts = null)
    public PostgresqlInstance(String name, PostgresqlInstanceArgs args)
    public PostgresqlInstance(String name, PostgresqlInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PostgresqlInstance
    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 PostgresqlInstanceArgs
    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 PostgresqlInstanceArgs
    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 PostgresqlInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresqlInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresqlInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    PostgresqlInstance 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 PostgresqlInstance resource accepts the following input properties:

    AvailabilityZone string
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    Memory double
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    RootPassword string
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    Storage double
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    SubnetId string
    ID of subnet.
    VpcId string
    ID of VPC.
    AutoRenewFlag double
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    AutoVoucher double
    Whether to use voucher, 1 for enabled.
    BackupPlan PostgresqlInstanceBackupPlan
    Specify DB backup plan.
    ChargeType string
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    Charset string
    Charset of the root account. Valid values are UTF8,LATIN1.
    Cpu double
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    DbKernelVersion string
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    DbMajorVersion string
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    DbMajorVesion string
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    DbNodeSets List<PostgresqlInstanceDbNodeSet>
    Specify instance node info for disaster migration.
    DeleteProtection bool
    Whether to enable instance deletion protection. Default: false.
    EngineVersion string
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    KmsClusterId string
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    KmsKeyId string
    KeyId of the custom key.
    KmsRegion string
    Region of the custom key.
    MaxStandbyArchiveDelay double
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    MaxStandbyStreamingDelay double
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    Name string
    Name of the postgresql instance.
    NeedSupportTde double
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    Period double
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    PostgresqlInstanceId string
    ID of the resource.
    ProjectId double
    Project id, default value is 0.
    PublicAccessSwitch bool
    Indicates whether to enable the access to an instance from public network or not.
    RootUser string
    Instance root account name. This parameter is optional, Default value is root.
    SecurityGroups List<string>
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    Tags Dictionary<string, string>
    The available tags within this postgresql.
    VoucherIds List<string>
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    WaitSwitch double
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    AvailabilityZone string
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    Memory float64
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    RootPassword string
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    Storage float64
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    SubnetId string
    ID of subnet.
    VpcId string
    ID of VPC.
    AutoRenewFlag float64
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    AutoVoucher float64
    Whether to use voucher, 1 for enabled.
    BackupPlan PostgresqlInstanceBackupPlanArgs
    Specify DB backup plan.
    ChargeType string
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    Charset string
    Charset of the root account. Valid values are UTF8,LATIN1.
    Cpu float64
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    DbKernelVersion string
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    DbMajorVersion string
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    DbMajorVesion string
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    DbNodeSets []PostgresqlInstanceDbNodeSetArgs
    Specify instance node info for disaster migration.
    DeleteProtection bool
    Whether to enable instance deletion protection. Default: false.
    EngineVersion string
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    KmsClusterId string
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    KmsKeyId string
    KeyId of the custom key.
    KmsRegion string
    Region of the custom key.
    MaxStandbyArchiveDelay float64
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    MaxStandbyStreamingDelay float64
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    Name string
    Name of the postgresql instance.
    NeedSupportTde float64
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    Period float64
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    PostgresqlInstanceId string
    ID of the resource.
    ProjectId float64
    Project id, default value is 0.
    PublicAccessSwitch bool
    Indicates whether to enable the access to an instance from public network or not.
    RootUser string
    Instance root account name. This parameter is optional, Default value is root.
    SecurityGroups []string
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    Tags map[string]string
    The available tags within this postgresql.
    VoucherIds []string
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    WaitSwitch float64
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    availabilityZone String
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    memory Double
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    rootPassword String
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    storage Double
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnetId String
    ID of subnet.
    vpcId String
    ID of VPC.
    autoRenewFlag Double
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    autoVoucher Double
    Whether to use voucher, 1 for enabled.
    backupPlan PostgresqlInstanceBackupPlan
    Specify DB backup plan.
    chargeType String
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset String
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu Double
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    dbKernelVersion String
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    dbMajorVersion String
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    dbMajorVesion String
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    dbNodeSets List<PostgresqlInstanceDbNodeSet>
    Specify instance node info for disaster migration.
    deleteProtection Boolean
    Whether to enable instance deletion protection. Default: false.
    engineVersion String
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kmsClusterId String
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kmsKeyId String
    KeyId of the custom key.
    kmsRegion String
    Region of the custom key.
    maxStandbyArchiveDelay Double
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    maxStandbyStreamingDelay Double
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    name String
    Name of the postgresql instance.
    needSupportTde Double
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period Double
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresqlInstanceId String
    ID of the resource.
    projectId Double
    Project id, default value is 0.
    publicAccessSwitch Boolean
    Indicates whether to enable the access to an instance from public network or not.
    rootUser String
    Instance root account name. This parameter is optional, Default value is root.
    securityGroups List<String>
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    tags Map<String,String>
    The available tags within this postgresql.
    voucherIds List<String>
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    waitSwitch Double
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    availabilityZone string
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    memory number
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    rootPassword string
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    storage number
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnetId string
    ID of subnet.
    vpcId string
    ID of VPC.
    autoRenewFlag number
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    autoVoucher number
    Whether to use voucher, 1 for enabled.
    backupPlan PostgresqlInstanceBackupPlan
    Specify DB backup plan.
    chargeType string
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset string
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu number
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    dbKernelVersion string
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    dbMajorVersion string
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    dbMajorVesion string
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    dbNodeSets PostgresqlInstanceDbNodeSet[]
    Specify instance node info for disaster migration.
    deleteProtection boolean
    Whether to enable instance deletion protection. Default: false.
    engineVersion string
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kmsClusterId string
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kmsKeyId string
    KeyId of the custom key.
    kmsRegion string
    Region of the custom key.
    maxStandbyArchiveDelay number
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    maxStandbyStreamingDelay number
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    name string
    Name of the postgresql instance.
    needSupportTde number
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period number
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresqlInstanceId string
    ID of the resource.
    projectId number
    Project id, default value is 0.
    publicAccessSwitch boolean
    Indicates whether to enable the access to an instance from public network or not.
    rootUser string
    Instance root account name. This parameter is optional, Default value is root.
    securityGroups string[]
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    tags {[key: string]: string}
    The available tags within this postgresql.
    voucherIds string[]
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    waitSwitch number
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    availability_zone str
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    memory float
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    root_password str
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    storage float
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnet_id str
    ID of subnet.
    vpc_id str
    ID of VPC.
    auto_renew_flag float
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    auto_voucher float
    Whether to use voucher, 1 for enabled.
    backup_plan PostgresqlInstanceBackupPlanArgs
    Specify DB backup plan.
    charge_type str
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset str
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu float
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    db_kernel_version str
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    db_major_version str
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    db_major_vesion str
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    db_node_sets Sequence[PostgresqlInstanceDbNodeSetArgs]
    Specify instance node info for disaster migration.
    delete_protection bool
    Whether to enable instance deletion protection. Default: false.
    engine_version str
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kms_cluster_id str
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kms_key_id str
    KeyId of the custom key.
    kms_region str
    Region of the custom key.
    max_standby_archive_delay float
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    max_standby_streaming_delay float
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    name str
    Name of the postgresql instance.
    need_support_tde float
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period float
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresql_instance_id str
    ID of the resource.
    project_id float
    Project id, default value is 0.
    public_access_switch bool
    Indicates whether to enable the access to an instance from public network or not.
    root_user str
    Instance root account name. This parameter is optional, Default value is root.
    security_groups Sequence[str]
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    tags Mapping[str, str]
    The available tags within this postgresql.
    voucher_ids Sequence[str]
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    wait_switch float
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    availabilityZone String
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    memory Number
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    rootPassword String
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    storage Number
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnetId String
    ID of subnet.
    vpcId String
    ID of VPC.
    autoRenewFlag Number
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    autoVoucher Number
    Whether to use voucher, 1 for enabled.
    backupPlan Property Map
    Specify DB backup plan.
    chargeType String
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset String
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu Number
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    dbKernelVersion String
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    dbMajorVersion String
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    dbMajorVesion String
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    dbNodeSets List<Property Map>
    Specify instance node info for disaster migration.
    deleteProtection Boolean
    Whether to enable instance deletion protection. Default: false.
    engineVersion String
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kmsClusterId String
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kmsKeyId String
    KeyId of the custom key.
    kmsRegion String
    Region of the custom key.
    maxStandbyArchiveDelay Number
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    maxStandbyStreamingDelay Number
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    name String
    Name of the postgresql instance.
    needSupportTde Number
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period Number
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresqlInstanceId String
    ID of the resource.
    projectId Number
    Project id, default value is 0.
    publicAccessSwitch Boolean
    Indicates whether to enable the access to an instance from public network or not.
    rootUser String
    Instance root account name. This parameter is optional, Default value is root.
    securityGroups List<String>
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    tags Map<String>
    The available tags within this postgresql.
    voucherIds List<String>
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    waitSwitch Number
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PostgresqlInstance 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.
    PrivateAccessIp string
    IP for private access.
    PrivateAccessPort double
    Port for private access.
    PublicAccessHost string
    Host for public access.
    PublicAccessPort double
    Port for public access.
    Uid double
    Uid of the postgresql instance.
    CreateTime string
    Create time of the postgresql instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateAccessIp string
    IP for private access.
    PrivateAccessPort float64
    Port for private access.
    PublicAccessHost string
    Host for public access.
    PublicAccessPort float64
    Port for public access.
    Uid float64
    Uid of the postgresql instance.
    createTime String
    Create time of the postgresql instance.
    id String
    The provider-assigned unique ID for this managed resource.
    privateAccessIp String
    IP for private access.
    privateAccessPort Double
    Port for private access.
    publicAccessHost String
    Host for public access.
    publicAccessPort Double
    Port for public access.
    uid Double
    Uid of the postgresql instance.
    createTime string
    Create time of the postgresql instance.
    id string
    The provider-assigned unique ID for this managed resource.
    privateAccessIp string
    IP for private access.
    privateAccessPort number
    Port for private access.
    publicAccessHost string
    Host for public access.
    publicAccessPort number
    Port for public access.
    uid number
    Uid of the postgresql instance.
    create_time str
    Create time of the postgresql instance.
    id str
    The provider-assigned unique ID for this managed resource.
    private_access_ip str
    IP for private access.
    private_access_port float
    Port for private access.
    public_access_host str
    Host for public access.
    public_access_port float
    Port for public access.
    uid float
    Uid of the postgresql instance.
    createTime String
    Create time of the postgresql instance.
    id String
    The provider-assigned unique ID for this managed resource.
    privateAccessIp String
    IP for private access.
    privateAccessPort Number
    Port for private access.
    publicAccessHost String
    Host for public access.
    publicAccessPort Number
    Port for public access.
    uid Number
    Uid of the postgresql instance.

    Look up Existing PostgresqlInstance Resource

    Get an existing PostgresqlInstance 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?: PostgresqlInstanceState, opts?: CustomResourceOptions): PostgresqlInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_renew_flag: Optional[float] = None,
            auto_voucher: Optional[float] = None,
            availability_zone: Optional[str] = None,
            backup_plan: Optional[PostgresqlInstanceBackupPlanArgs] = None,
            charge_type: Optional[str] = None,
            charset: Optional[str] = None,
            cpu: Optional[float] = None,
            create_time: Optional[str] = None,
            db_kernel_version: Optional[str] = None,
            db_major_version: Optional[str] = None,
            db_major_vesion: Optional[str] = None,
            db_node_sets: Optional[Sequence[PostgresqlInstanceDbNodeSetArgs]] = None,
            delete_protection: Optional[bool] = None,
            engine_version: Optional[str] = None,
            kms_cluster_id: Optional[str] = None,
            kms_key_id: Optional[str] = None,
            kms_region: Optional[str] = None,
            max_standby_archive_delay: Optional[float] = None,
            max_standby_streaming_delay: Optional[float] = None,
            memory: Optional[float] = None,
            name: Optional[str] = None,
            need_support_tde: Optional[float] = None,
            period: Optional[float] = None,
            postgresql_instance_id: Optional[str] = None,
            private_access_ip: Optional[str] = None,
            private_access_port: Optional[float] = None,
            project_id: Optional[float] = None,
            public_access_host: Optional[str] = None,
            public_access_port: Optional[float] = None,
            public_access_switch: Optional[bool] = None,
            root_password: Optional[str] = None,
            root_user: Optional[str] = None,
            security_groups: Optional[Sequence[str]] = None,
            storage: Optional[float] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            uid: Optional[float] = None,
            voucher_ids: Optional[Sequence[str]] = None,
            vpc_id: Optional[str] = None,
            wait_switch: Optional[float] = None) -> PostgresqlInstance
    func GetPostgresqlInstance(ctx *Context, name string, id IDInput, state *PostgresqlInstanceState, opts ...ResourceOption) (*PostgresqlInstance, error)
    public static PostgresqlInstance Get(string name, Input<string> id, PostgresqlInstanceState? state, CustomResourceOptions? opts = null)
    public static PostgresqlInstance get(String name, Output<String> id, PostgresqlInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlInstance    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.
    The following state arguments are supported:
    AutoRenewFlag double
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    AutoVoucher double
    Whether to use voucher, 1 for enabled.
    AvailabilityZone string
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    BackupPlan PostgresqlInstanceBackupPlan
    Specify DB backup plan.
    ChargeType string
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    Charset string
    Charset of the root account. Valid values are UTF8,LATIN1.
    Cpu double
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    CreateTime string
    Create time of the postgresql instance.
    DbKernelVersion string
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    DbMajorVersion string
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    DbMajorVesion string
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    DbNodeSets List<PostgresqlInstanceDbNodeSet>
    Specify instance node info for disaster migration.
    DeleteProtection bool
    Whether to enable instance deletion protection. Default: false.
    EngineVersion string
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    KmsClusterId string
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    KmsKeyId string
    KeyId of the custom key.
    KmsRegion string
    Region of the custom key.
    MaxStandbyArchiveDelay double
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    MaxStandbyStreamingDelay double
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    Memory double
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    Name string
    Name of the postgresql instance.
    NeedSupportTde double
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    Period double
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    PostgresqlInstanceId string
    ID of the resource.
    PrivateAccessIp string
    IP for private access.
    PrivateAccessPort double
    Port for private access.
    ProjectId double
    Project id, default value is 0.
    PublicAccessHost string
    Host for public access.
    PublicAccessPort double
    Port for public access.
    PublicAccessSwitch bool
    Indicates whether to enable the access to an instance from public network or not.
    RootPassword string
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    RootUser string
    Instance root account name. This parameter is optional, Default value is root.
    SecurityGroups List<string>
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    Storage double
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    SubnetId string
    ID of subnet.
    Tags Dictionary<string, string>
    The available tags within this postgresql.
    Uid double
    Uid of the postgresql instance.
    VoucherIds List<string>
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    VpcId string
    ID of VPC.
    WaitSwitch double
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    AutoRenewFlag float64
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    AutoVoucher float64
    Whether to use voucher, 1 for enabled.
    AvailabilityZone string
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    BackupPlan PostgresqlInstanceBackupPlanArgs
    Specify DB backup plan.
    ChargeType string
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    Charset string
    Charset of the root account. Valid values are UTF8,LATIN1.
    Cpu float64
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    CreateTime string
    Create time of the postgresql instance.
    DbKernelVersion string
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    DbMajorVersion string
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    DbMajorVesion string
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    DbNodeSets []PostgresqlInstanceDbNodeSetArgs
    Specify instance node info for disaster migration.
    DeleteProtection bool
    Whether to enable instance deletion protection. Default: false.
    EngineVersion string
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    KmsClusterId string
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    KmsKeyId string
    KeyId of the custom key.
    KmsRegion string
    Region of the custom key.
    MaxStandbyArchiveDelay float64
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    MaxStandbyStreamingDelay float64
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    Memory float64
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    Name string
    Name of the postgresql instance.
    NeedSupportTde float64
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    Period float64
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    PostgresqlInstanceId string
    ID of the resource.
    PrivateAccessIp string
    IP for private access.
    PrivateAccessPort float64
    Port for private access.
    ProjectId float64
    Project id, default value is 0.
    PublicAccessHost string
    Host for public access.
    PublicAccessPort float64
    Port for public access.
    PublicAccessSwitch bool
    Indicates whether to enable the access to an instance from public network or not.
    RootPassword string
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    RootUser string
    Instance root account name. This parameter is optional, Default value is root.
    SecurityGroups []string
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    Storage float64
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    SubnetId string
    ID of subnet.
    Tags map[string]string
    The available tags within this postgresql.
    Uid float64
    Uid of the postgresql instance.
    VoucherIds []string
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    VpcId string
    ID of VPC.
    WaitSwitch float64
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    autoRenewFlag Double
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    autoVoucher Double
    Whether to use voucher, 1 for enabled.
    availabilityZone String
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    backupPlan PostgresqlInstanceBackupPlan
    Specify DB backup plan.
    chargeType String
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset String
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu Double
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    createTime String
    Create time of the postgresql instance.
    dbKernelVersion String
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    dbMajorVersion String
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    dbMajorVesion String
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    dbNodeSets List<PostgresqlInstanceDbNodeSet>
    Specify instance node info for disaster migration.
    deleteProtection Boolean
    Whether to enable instance deletion protection. Default: false.
    engineVersion String
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kmsClusterId String
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kmsKeyId String
    KeyId of the custom key.
    kmsRegion String
    Region of the custom key.
    maxStandbyArchiveDelay Double
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    maxStandbyStreamingDelay Double
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    memory Double
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    name String
    Name of the postgresql instance.
    needSupportTde Double
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period Double
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresqlInstanceId String
    ID of the resource.
    privateAccessIp String
    IP for private access.
    privateAccessPort Double
    Port for private access.
    projectId Double
    Project id, default value is 0.
    publicAccessHost String
    Host for public access.
    publicAccessPort Double
    Port for public access.
    publicAccessSwitch Boolean
    Indicates whether to enable the access to an instance from public network or not.
    rootPassword String
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    rootUser String
    Instance root account name. This parameter is optional, Default value is root.
    securityGroups List<String>
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    storage Double
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnetId String
    ID of subnet.
    tags Map<String,String>
    The available tags within this postgresql.
    uid Double
    Uid of the postgresql instance.
    voucherIds List<String>
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    vpcId String
    ID of VPC.
    waitSwitch Double
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    autoRenewFlag number
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    autoVoucher number
    Whether to use voucher, 1 for enabled.
    availabilityZone string
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    backupPlan PostgresqlInstanceBackupPlan
    Specify DB backup plan.
    chargeType string
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset string
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu number
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    createTime string
    Create time of the postgresql instance.
    dbKernelVersion string
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    dbMajorVersion string
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    dbMajorVesion string
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    dbNodeSets PostgresqlInstanceDbNodeSet[]
    Specify instance node info for disaster migration.
    deleteProtection boolean
    Whether to enable instance deletion protection. Default: false.
    engineVersion string
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kmsClusterId string
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kmsKeyId string
    KeyId of the custom key.
    kmsRegion string
    Region of the custom key.
    maxStandbyArchiveDelay number
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    maxStandbyStreamingDelay number
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    memory number
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    name string
    Name of the postgresql instance.
    needSupportTde number
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period number
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresqlInstanceId string
    ID of the resource.
    privateAccessIp string
    IP for private access.
    privateAccessPort number
    Port for private access.
    projectId number
    Project id, default value is 0.
    publicAccessHost string
    Host for public access.
    publicAccessPort number
    Port for public access.
    publicAccessSwitch boolean
    Indicates whether to enable the access to an instance from public network or not.
    rootPassword string
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    rootUser string
    Instance root account name. This parameter is optional, Default value is root.
    securityGroups string[]
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    storage number
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnetId string
    ID of subnet.
    tags {[key: string]: string}
    The available tags within this postgresql.
    uid number
    Uid of the postgresql instance.
    voucherIds string[]
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    vpcId string
    ID of VPC.
    waitSwitch number
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    auto_renew_flag float
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    auto_voucher float
    Whether to use voucher, 1 for enabled.
    availability_zone str
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    backup_plan PostgresqlInstanceBackupPlanArgs
    Specify DB backup plan.
    charge_type str
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset str
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu float
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    create_time str
    Create time of the postgresql instance.
    db_kernel_version str
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    db_major_version str
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    db_major_vesion str
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    db_node_sets Sequence[PostgresqlInstanceDbNodeSetArgs]
    Specify instance node info for disaster migration.
    delete_protection bool
    Whether to enable instance deletion protection. Default: false.
    engine_version str
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kms_cluster_id str
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kms_key_id str
    KeyId of the custom key.
    kms_region str
    Region of the custom key.
    max_standby_archive_delay float
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    max_standby_streaming_delay float
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    memory float
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    name str
    Name of the postgresql instance.
    need_support_tde float
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period float
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresql_instance_id str
    ID of the resource.
    private_access_ip str
    IP for private access.
    private_access_port float
    Port for private access.
    project_id float
    Project id, default value is 0.
    public_access_host str
    Host for public access.
    public_access_port float
    Port for public access.
    public_access_switch bool
    Indicates whether to enable the access to an instance from public network or not.
    root_password str
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    root_user str
    Instance root account name. This parameter is optional, Default value is root.
    security_groups Sequence[str]
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    storage float
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnet_id str
    ID of subnet.
    tags Mapping[str, str]
    The available tags within this postgresql.
    uid float
    Uid of the postgresql instance.
    voucher_ids Sequence[str]
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    vpc_id str
    ID of VPC.
    wait_switch float
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.
    autoRenewFlag Number
    Auto renew flag, 1 for enabled. NOTES: Only support prepaid instance.
    autoVoucher Number
    Whether to use voucher, 1 for enabled.
    availabilityZone String
    Availability zone. NOTE: This field could not be modified, please use db_node_set instead of modification. The changes on this field will be suppressed when using the db_node_set.
    backupPlan Property Map
    Specify DB backup plan.
    chargeType String
    Pay type of the postgresql instance. Values POSTPAID_BY_HOUR (Default), PREPAID. It only support to update the type from POSTPAID_BY_HOUR to PREPAID.
    charset String
    Charset of the root account. Valid values are UTF8,LATIN1.
    cpu Number
    Number of CPU cores. Allowed value must be equal cpu that data source tencentcloud.getPostgresqlSpecinfos provides.
    createTime String
    Create time of the postgresql instance.
    dbKernelVersion String
    PostgreSQL kernel version number. If it is specified, an instance running kernel DBKernelVersion will be created. It supports updating the minor kernel version immediately.
    dbMajorVersion String
    PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.
    dbMajorVesion String
    db_major_vesion will be deprecated, use db_major_version instead. PostgreSQL major version number. Valid values: 10, 11, 12, 13, 14, 15, 16. If it is specified, an instance running the latest kernel of PostgreSQL DBMajorVersion will be created.

    Deprecated: Deprecated

    dbNodeSets List<Property Map>
    Specify instance node info for disaster migration.
    deleteProtection Boolean
    Whether to enable instance deletion protection. Default: false.
    engineVersion String
    Version of the postgresql database engine. Valid values: 10.4, 10.17, 10.23, 11.8, 11.12, 11.22, 12.4, 12.7, 12.18, 13.3, 14.2, 14.11, 15.1, 16.0.
    kmsClusterId String
    Specify the cluster served by KMS. If KMSClusterId is blank, use the KMS of the default cluster. If you choose to specify a KMS cluster, you need to pass in KMSClusterId.
    kmsKeyId String
    KeyId of the custom key.
    kmsRegion String
    Region of the custom key.
    maxStandbyArchiveDelay Number
    max_standby_archive_delay applies when WAL data is being read from WAL archive (and is therefore not current). Units are milliseconds if not specified.
    maxStandbyStreamingDelay Number
    max_standby_streaming_delay applies when WAL data is being received via streaming replication. Units are milliseconds if not specified.
    memory Number
    Memory size(in GB). Allowed value must be larger than memory that data source tencentcloud.getPostgresqlSpecinfos provides.
    name String
    Name of the postgresql instance.
    needSupportTde Number
    Whether to support data transparent encryption, 1: yes, 0: no (default).
    period Number
    Specify Prepaid period in month. Default 1. Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. This field is valid only when creating a PREPAID type instance, or updating the charge type from POSTPAID_BY_HOUR to PREPAID.
    postgresqlInstanceId String
    ID of the resource.
    privateAccessIp String
    IP for private access.
    privateAccessPort Number
    Port for private access.
    projectId Number
    Project id, default value is 0.
    publicAccessHost String
    Host for public access.
    publicAccessPort Number
    Port for public access.
    publicAccessSwitch Boolean
    Indicates whether to enable the access to an instance from public network or not.
    rootPassword String
    Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
    rootUser String
    Instance root account name. This parameter is optional, Default value is root.
    securityGroups List<String>
    ID of security group. If both vpc_id and subnet_id are not set, this argument should not be set either.
    storage Number
    Volume size(in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of storage_min and storage_max which data source tencentcloud.getPostgresqlSpecinfos provides.
    subnetId String
    ID of subnet.
    tags Map<String>
    The available tags within this postgresql.
    uid Number
    Uid of the postgresql instance.
    voucherIds List<String>
    Specify Voucher Ids if auto_voucher was 1, only support using 1 vouchers for now.
    vpcId String
    ID of VPC.
    waitSwitch Number
    Switch time after instance configurations are modified. 0: Switch immediately; 2: Switch during maintenance time window. Default: 0. Note: This only takes effect when updating the memory, storage, cpu, db_node_set, db_kernel_version fields.

    Supporting Types

    PostgresqlInstanceBackupPlan, PostgresqlInstanceBackupPlanArgs

    BackupPeriods List<string>
    List of backup period per week, available values: monday, tuesday, wednesday, thursday, friday, saturday, sunday. NOTE: At least specify two days.
    BaseBackupRetentionPeriod double
    Specify days of the retention.
    MaxBackupStartTime string
    Specify latest backup start time, format hh:mm:ss.
    MinBackupStartTime string
    Specify earliest backup start time, format hh:mm:ss.
    MonthlyBackupPeriods List<string>
    If it is in monthly dimension, the format is numeric characters, such as ["1","2"].
    MonthlyBackupRetentionPeriod double
    Specify days of the retention.
    MonthlyPlanId string
    Monthly plan id.
    BackupPeriods []string
    List of backup period per week, available values: monday, tuesday, wednesday, thursday, friday, saturday, sunday. NOTE: At least specify two days.
    BaseBackupRetentionPeriod float64
    Specify days of the retention.
    MaxBackupStartTime string
    Specify latest backup start time, format hh:mm:ss.
    MinBackupStartTime string
    Specify earliest backup start time, format hh:mm:ss.
    MonthlyBackupPeriods []string
    If it is in monthly dimension, the format is numeric characters, such as ["1","2"].
    MonthlyBackupRetentionPeriod float64
    Specify days of the retention.
    MonthlyPlanId string
    Monthly plan id.
    backupPeriods List<String>
    List of backup period per week, available values: monday, tuesday, wednesday, thursday, friday, saturday, sunday. NOTE: At least specify two days.
    baseBackupRetentionPeriod Double
    Specify days of the retention.
    maxBackupStartTime String
    Specify latest backup start time, format hh:mm:ss.
    minBackupStartTime String
    Specify earliest backup start time, format hh:mm:ss.
    monthlyBackupPeriods List<String>
    If it is in monthly dimension, the format is numeric characters, such as ["1","2"].
    monthlyBackupRetentionPeriod Double
    Specify days of the retention.
    monthlyPlanId String
    Monthly plan id.
    backupPeriods string[]
    List of backup period per week, available values: monday, tuesday, wednesday, thursday, friday, saturday, sunday. NOTE: At least specify two days.
    baseBackupRetentionPeriod number
    Specify days of the retention.
    maxBackupStartTime string
    Specify latest backup start time, format hh:mm:ss.
    minBackupStartTime string
    Specify earliest backup start time, format hh:mm:ss.
    monthlyBackupPeriods string[]
    If it is in monthly dimension, the format is numeric characters, such as ["1","2"].
    monthlyBackupRetentionPeriod number
    Specify days of the retention.
    monthlyPlanId string
    Monthly plan id.
    backup_periods Sequence[str]
    List of backup period per week, available values: monday, tuesday, wednesday, thursday, friday, saturday, sunday. NOTE: At least specify two days.
    base_backup_retention_period float
    Specify days of the retention.
    max_backup_start_time str
    Specify latest backup start time, format hh:mm:ss.
    min_backup_start_time str
    Specify earliest backup start time, format hh:mm:ss.
    monthly_backup_periods Sequence[str]
    If it is in monthly dimension, the format is numeric characters, such as ["1","2"].
    monthly_backup_retention_period float
    Specify days of the retention.
    monthly_plan_id str
    Monthly plan id.
    backupPeriods List<String>
    List of backup period per week, available values: monday, tuesday, wednesday, thursday, friday, saturday, sunday. NOTE: At least specify two days.
    baseBackupRetentionPeriod Number
    Specify days of the retention.
    maxBackupStartTime String
    Specify latest backup start time, format hh:mm:ss.
    minBackupStartTime String
    Specify earliest backup start time, format hh:mm:ss.
    monthlyBackupPeriods List<String>
    If it is in monthly dimension, the format is numeric characters, such as ["1","2"].
    monthlyBackupRetentionPeriod Number
    Specify days of the retention.
    monthlyPlanId String
    Monthly plan id.

    PostgresqlInstanceDbNodeSet, PostgresqlInstanceDbNodeSetArgs

    Zone string
    Indicates the node available zone.
    DedicatedClusterId string
    Dedicated cluster ID.
    Role string
    Indicates node type, available values:Primary, Standby. Default: Standby.
    Zone string
    Indicates the node available zone.
    DedicatedClusterId string
    Dedicated cluster ID.
    Role string
    Indicates node type, available values:Primary, Standby. Default: Standby.
    zone String
    Indicates the node available zone.
    dedicatedClusterId String
    Dedicated cluster ID.
    role String
    Indicates node type, available values:Primary, Standby. Default: Standby.
    zone string
    Indicates the node available zone.
    dedicatedClusterId string
    Dedicated cluster ID.
    role string
    Indicates node type, available values:Primary, Standby. Default: Standby.
    zone str
    Indicates the node available zone.
    dedicated_cluster_id str
    Dedicated cluster ID.
    role str
    Indicates node type, available values:Primary, Standby. Default: Standby.
    zone String
    Indicates the node available zone.
    dedicatedClusterId String
    Dedicated cluster ID.
    role String
    Indicates node type, available values:Primary, Standby. Default: Standby.

    Import

    postgresql instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/postgresqlInstance:PostgresqlInstance example postgres-cda1iex1
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack