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

tencentcloud.PostgresqlAccount

Explore with Pulumi AI

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

    Provides a resource to create a postgresql account

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-3";
    // create vpc
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    // create vpc subnet
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: availabilityZone,
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.20.0/28",
        isMulticast: false,
    });
    // create postgresql
    const examplePostgresqlInstance = new tencentcloud.PostgresqlInstance("examplePostgresqlInstance", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        dbMajorVersion: "10",
        engineVersion: "10.23",
        rootUser: "root123",
        rootPassword: "Root123$",
        charset: "UTF8",
        projectId: 0,
        cpu: 1,
        memory: 2,
        storage: 10,
        tags: {
            test: "tf",
        },
    });
    // create account
    const examplePostgresqlAccount = new tencentcloud.PostgresqlAccount("examplePostgresqlAccount", {
        dbInstanceId: examplePostgresqlInstance.postgresqlInstanceId,
        userName: "tf_example",
        password: "Password@123",
        type: "normal",
        remark: "remark",
        lockStatus: false,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-3"
    # create vpc
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    # create vpc subnet
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=availability_zone,
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.20.0/28",
        is_multicast=False)
    # create postgresql
    example_postgresql_instance = tencentcloud.PostgresqlInstance("examplePostgresqlInstance",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        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={
            "test": "tf",
        })
    # create account
    example_postgresql_account = tencentcloud.PostgresqlAccount("examplePostgresqlAccount",
        db_instance_id=example_postgresql_instance.postgresql_instance_id,
        user_name="tf_example",
        password="Password@123",
        type="normal",
        remark="remark",
        lock_status=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		availabilityZone := "ap-guangzhou-3"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		// create vpc
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		// create vpc subnet
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.20.0/28"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		// create postgresql
    		examplePostgresqlInstance, err := tencentcloud.NewPostgresqlInstance(ctx, "examplePostgresqlInstance", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			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{
    				"test": pulumi.String("tf"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// create account
    		_, err = tencentcloud.NewPostgresqlAccount(ctx, "examplePostgresqlAccount", &tencentcloud.PostgresqlAccountArgs{
    			DbInstanceId: examplePostgresqlInstance.PostgresqlInstanceId,
    			UserName:     pulumi.String("tf_example"),
    			Password:     pulumi.String("Password@123"),
    			Type:         pulumi.String("normal"),
    			Remark:       pulumi.String("remark"),
    			LockStatus:   pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-3";
        // create vpc
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        // create vpc subnet
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = availabilityZone,
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.20.0/28",
            IsMulticast = false,
        });
    
        // create postgresql
        var examplePostgresqlInstance = new Tencentcloud.PostgresqlInstance("examplePostgresqlInstance", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            DbMajorVersion = "10",
            EngineVersion = "10.23",
            RootUser = "root123",
            RootPassword = "Root123$",
            Charset = "UTF8",
            ProjectId = 0,
            Cpu = 1,
            Memory = 2,
            Storage = 10,
            Tags = 
            {
                { "test", "tf" },
            },
        });
    
        // create account
        var examplePostgresqlAccount = new Tencentcloud.PostgresqlAccount("examplePostgresqlAccount", new()
        {
            DbInstanceId = examplePostgresqlInstance.PostgresqlInstanceId,
            UserName = "tf_example",
            Password = "Password@123",
            Type = "normal",
            Remark = "remark",
            LockStatus = false,
        });
    
    });
    
    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.PostgresqlAccount;
    import com.pulumi.tencentcloud.PostgresqlAccountArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-3");
            // create vpc
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            // create vpc subnet
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(availabilityZone)
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.20.0/28")
                .isMulticast(false)
                .build());
    
            // create postgresql
            var examplePostgresqlInstance = new PostgresqlInstance("examplePostgresqlInstance", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .dbMajorVersion("10")
                .engineVersion("10.23")
                .rootUser("root123")
                .rootPassword("Root123$")
                .charset("UTF8")
                .projectId(0)
                .cpu(1)
                .memory(2)
                .storage(10)
                .tags(Map.of("test", "tf"))
                .build());
    
            // create account
            var examplePostgresqlAccount = new PostgresqlAccount("examplePostgresqlAccount", PostgresqlAccountArgs.builder()
                .dbInstanceId(examplePostgresqlInstance.postgresqlInstanceId())
                .userName("tf_example")
                .password("Password@123")
                .type("normal")
                .remark("remark")
                .lockStatus(false)
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-3
    resources:
      # create vpc
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      # create vpc subnet
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${availabilityZone}
          vpcId: ${vpc.vpcId}
          cidrBlock: 10.0.20.0/28
          isMulticast: false
      # create postgresql
      examplePostgresqlInstance:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          dbMajorVersion: '10'
          engineVersion: '10.23'
          rootUser: root123
          rootPassword: Root123$
          charset: UTF8
          projectId: 0
          cpu: 1
          memory: 2
          storage: 10
          tags:
            test: tf
      # create account
      examplePostgresqlAccount:
        type: tencentcloud:PostgresqlAccount
        properties:
          dbInstanceId: ${examplePostgresqlInstance.postgresqlInstanceId}
          userName: tf_example
          password: Password@123
          type: normal
          remark: remark
          lockStatus: false
    

    Create PostgresqlAccount Resource

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

    Constructor syntax

    new PostgresqlAccount(name: string, args: PostgresqlAccountArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresqlAccount(resource_name: str,
                          args: PostgresqlAccountArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresqlAccount(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          db_instance_id: Optional[str] = None,
                          password: Optional[str] = None,
                          type: Optional[str] = None,
                          user_name: Optional[str] = None,
                          lock_status: Optional[bool] = None,
                          postgresql_account_id: Optional[str] = None,
                          remark: Optional[str] = None)
    func NewPostgresqlAccount(ctx *Context, name string, args PostgresqlAccountArgs, opts ...ResourceOption) (*PostgresqlAccount, error)
    public PostgresqlAccount(string name, PostgresqlAccountArgs args, CustomResourceOptions? opts = null)
    public PostgresqlAccount(String name, PostgresqlAccountArgs args)
    public PostgresqlAccount(String name, PostgresqlAccountArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PostgresqlAccount
    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 PostgresqlAccountArgs
    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 PostgresqlAccountArgs
    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 PostgresqlAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresqlAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresqlAccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    Password string
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&*-+=_|{}[]:;'<>,.?/); can't start with slash /.
    Type string
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    UserName string
    Instance username, which can contain 1-16 letters, digits, and underscore (); can't be postgres; can't start with numbers, pg, and tencentdb_.
    LockStatus bool
    whether lock account. true: locked; false: unlock.
    PostgresqlAccountId string
    ID of the resource.
    Remark string
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    Password string
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&*-+=_|{}[]:;'<>,.?/); can't start with slash /.
    Type string
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    UserName string
    Instance username, which can contain 1-16 letters, digits, and underscore (); can't be postgres; can't start with numbers, pg, and tencentdb_.
    LockStatus bool
    whether lock account. true: locked; false: unlock.
    PostgresqlAccountId string
    ID of the resource.
    Remark string
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    password String
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&*-+=_|{}[]:;'<>,.?/); can't start with slash /.
    type String
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    userName String
    Instance username, which can contain 1-16 letters, digits, and underscore (); can't be postgres; can't start with numbers, pg, and tencentdb_.
    lockStatus Boolean
    whether lock account. true: locked; false: unlock.
    postgresqlAccountId String
    ID of the resource.
    remark String
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    dbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    password string
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&*-+=_|{}[]:;'<>,.?/); can't start with slash /.
    type string
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    userName string
    Instance username, which can contain 1-16 letters, digits, and underscore (); can't be postgres; can't start with numbers, pg, and tencentdb_.
    lockStatus boolean
    whether lock account. true: locked; false: unlock.
    postgresqlAccountId string
    ID of the resource.
    remark string
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    db_instance_id str
    Instance ID in the format of postgres-4wdeb0zv.
    password str
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&*-+=_|{}[]:;'<>,.?/); can't start with slash /.
    type str
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    user_name str
    Instance username, which can contain 1-16 letters, digits, and underscore (); can't be postgres; can't start with numbers, pg, and tencentdb_.
    lock_status bool
    whether lock account. true: locked; false: unlock.
    postgresql_account_id str
    ID of the resource.
    remark str
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    password String
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&*-+=_|{}[]:;'<>,.?/); can't start with slash /.
    type String
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    userName String
    Instance username, which can contain 1-16 letters, digits, and underscore (); can't be postgres; can't start with numbers, pg, and tencentdb_.
    lockStatus Boolean
    whether lock account. true: locked; false: unlock.
    postgresqlAccountId String
    ID of the resource.
    remark String
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PostgresqlAccount resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PostgresqlAccount Resource

    Get an existing PostgresqlAccount 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?: PostgresqlAccountState, opts?: CustomResourceOptions): PostgresqlAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_instance_id: Optional[str] = None,
            lock_status: Optional[bool] = None,
            password: Optional[str] = None,
            postgresql_account_id: Optional[str] = None,
            remark: Optional[str] = None,
            type: Optional[str] = None,
            user_name: Optional[str] = None) -> PostgresqlAccount
    func GetPostgresqlAccount(ctx *Context, name string, id IDInput, state *PostgresqlAccountState, opts ...ResourceOption) (*PostgresqlAccount, error)
    public static PostgresqlAccount Get(string name, Input<string> id, PostgresqlAccountState? state, CustomResourceOptions? opts = null)
    public static PostgresqlAccount get(String name, Output<String> id, PostgresqlAccountState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlAccount    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:
    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    LockStatus bool
    whether lock account. true: locked; false: unlock.
    Password string
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&amp;amp;*-+=_|{}[]:;&amp;#39;&amp;lt;&amp;gt;,.?/); can&amp;#39;t start with slash /.
    PostgresqlAccountId string
    ID of the resource.
    Remark string
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    Type string
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    UserName string
    Instance username, which can contain 1-16 letters, digits, and underscore (); can&amp;#39;t be postgres; can&amp;#39;t start with numbers, pg, and tencentdb_.
    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    LockStatus bool
    whether lock account. true: locked; false: unlock.
    Password string
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&amp;amp;*-+=_|{}[]:;&amp;#39;&amp;lt;&amp;gt;,.?/); can&amp;#39;t start with slash /.
    PostgresqlAccountId string
    ID of the resource.
    Remark string
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    Type string
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    UserName string
    Instance username, which can contain 1-16 letters, digits, and underscore (); can&amp;#39;t be postgres; can&amp;#39;t start with numbers, pg, and tencentdb_.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    lockStatus Boolean
    whether lock account. true: locked; false: unlock.
    password String
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&amp;amp;*-+=_|{}[]:;&amp;#39;&amp;lt;&amp;gt;,.?/); can&amp;#39;t start with slash /.
    postgresqlAccountId String
    ID of the resource.
    remark String
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    type String
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    userName String
    Instance username, which can contain 1-16 letters, digits, and underscore (); can&amp;#39;t be postgres; can&amp;#39;t start with numbers, pg, and tencentdb_.
    dbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    lockStatus boolean
    whether lock account. true: locked; false: unlock.
    password string
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&amp;amp;*-+=_|{}[]:;&amp;#39;&amp;lt;&amp;gt;,.?/); can&amp;#39;t start with slash /.
    postgresqlAccountId string
    ID of the resource.
    remark string
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    type string
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    userName string
    Instance username, which can contain 1-16 letters, digits, and underscore (); can&amp;#39;t be postgres; can&amp;#39;t start with numbers, pg, and tencentdb_.
    db_instance_id str
    Instance ID in the format of postgres-4wdeb0zv.
    lock_status bool
    whether lock account. true: locked; false: unlock.
    password str
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&amp;amp;*-+=_|{}[]:;&amp;#39;&amp;lt;&amp;gt;,.?/); can&amp;#39;t start with slash /.
    postgresql_account_id str
    ID of the resource.
    remark str
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    type str
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    user_name str
    Instance username, which can contain 1-16 letters, digits, and underscore (); can&amp;#39;t be postgres; can&amp;#39;t start with numbers, pg, and tencentdb_.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    lockStatus Boolean
    whether lock account. true: locked; false: unlock.
    password String
    Password, which can contain 8-32 letters, digits, and symbols (()`~!@#$%^&amp;amp;*-+=_|{}[]:;&amp;#39;&amp;lt;&amp;gt;,.?/); can&amp;#39;t start with slash /.
    postgresqlAccountId String
    ID of the resource.
    remark String
    Remarks correspond to user UserName, which can contain 0-60 letters, digits, symbols (-_), and Chinese characters.
    type String
    The type of user. Valid values: 1. normal: regular user; 2. tencentDBSuper: user with the pg_tencentdb_superuser role.
    userName String
    Instance username, which can contain 1-16 letters, digits, and underscore (); can&amp;#39;t be postgres; can&amp;#39;t start with numbers, pg, and tencentdb_.

    Import

    postgres account can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/postgresqlAccount:PostgresqlAccount example postgres-3hk6b6tj#tf_example
    

    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