1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. PostgresqlParameters
Viewing docs for tencentcloud 1.82.73
published on Friday, Mar 6, 2026 by tencentcloudstack
tencentcloud logo
Viewing docs for tencentcloud 1.82.73
published on Friday, Mar 6, 2026 by tencentcloudstack

    Use this resource to create PostgreSQL parameters.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.PostgresqlInstance("example", {
        name: "tf-example",
        availabilityZone: "ap-guangzhou-6",
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: "vpc-i5yyodl9",
        subnetId: "subnet-hhi88a58",
        dbMajorVersion: "17",
        engineVersion: "17.4",
        dbKernelVersion: "v17.4_r1.4",
        rootUser: "root123",
        rootPassword: "Root123$",
        charset: "UTF8",
        projectId: 0,
        memory: 4,
        cpu: 2,
        storage: 50,
        tags: {
            CreateBy: "Terraform",
        },
    });
    const examplePostgresqlParameters = new tencentcloud.PostgresqlParameters("example", {
        dbInstanceId: example.postgresqlInstanceId,
        paramLists: [
            {
                name: "check_function_bodies",
                expectedValue: "off",
            },
            {
                name: "max_standby_archive_delay",
                expectedValue: "35000",
            },
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.PostgresqlInstance("example",
        name="tf-example",
        availability_zone="ap-guangzhou-6",
        charge_type="POSTPAID_BY_HOUR",
        vpc_id="vpc-i5yyodl9",
        subnet_id="subnet-hhi88a58",
        db_major_version="17",
        engine_version="17.4",
        db_kernel_version="v17.4_r1.4",
        root_user="root123",
        root_password="Root123$",
        charset="UTF8",
        project_id=0,
        memory=4,
        cpu=2,
        storage=50,
        tags={
            "CreateBy": "Terraform",
        })
    example_postgresql_parameters = tencentcloud.PostgresqlParameters("example",
        db_instance_id=example.postgresql_instance_id,
        param_lists=[
            {
                "name": "check_function_bodies",
                "expected_value": "off",
            },
            {
                "name": "max_standby_archive_delay",
                "expected_value": "35000",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tencentcloud.NewPostgresqlInstance(ctx, "example", &tencentcloud.PostgresqlInstanceArgs{
    			Name:             pulumi.String("tf-example"),
    			AvailabilityZone: pulumi.String("ap-guangzhou-6"),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            pulumi.String("vpc-i5yyodl9"),
    			SubnetId:         pulumi.String("subnet-hhi88a58"),
    			DbMajorVersion:   pulumi.String("17"),
    			EngineVersion:    pulumi.String("17.4"),
    			DbKernelVersion:  pulumi.String("v17.4_r1.4"),
    			RootUser:         pulumi.String("root123"),
    			RootPassword:     pulumi.String("Root123$"),
    			Charset:          pulumi.String("UTF8"),
    			ProjectId:        pulumi.Float64(0),
    			Memory:           pulumi.Float64(4),
    			Cpu:              pulumi.Float64(2),
    			Storage:          pulumi.Float64(50),
    			Tags: pulumi.StringMap{
    				"CreateBy": pulumi.String("Terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewPostgresqlParameters(ctx, "example", &tencentcloud.PostgresqlParametersArgs{
    			DbInstanceId: example.PostgresqlInstanceId,
    			ParamLists: tencentcloud.PostgresqlParametersParamListArray{
    				&tencentcloud.PostgresqlParametersParamListArgs{
    					Name:          pulumi.String("check_function_bodies"),
    					ExpectedValue: pulumi.String("off"),
    				},
    				&tencentcloud.PostgresqlParametersParamListArgs{
    					Name:          pulumi.String("max_standby_archive_delay"),
    					ExpectedValue: pulumi.String("35000"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.PostgresqlInstance("example", new()
        {
            Name = "tf-example",
            AvailabilityZone = "ap-guangzhou-6",
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = "vpc-i5yyodl9",
            SubnetId = "subnet-hhi88a58",
            DbMajorVersion = "17",
            EngineVersion = "17.4",
            DbKernelVersion = "v17.4_r1.4",
            RootUser = "root123",
            RootPassword = "Root123$",
            Charset = "UTF8",
            ProjectId = 0,
            Memory = 4,
            Cpu = 2,
            Storage = 50,
            Tags = 
            {
                { "CreateBy", "Terraform" },
            },
        });
    
        var examplePostgresqlParameters = new Tencentcloud.PostgresqlParameters("example", new()
        {
            DbInstanceId = example.PostgresqlInstanceId,
            ParamLists = new[]
            {
                new Tencentcloud.Inputs.PostgresqlParametersParamListArgs
                {
                    Name = "check_function_bodies",
                    ExpectedValue = "off",
                },
                new Tencentcloud.Inputs.PostgresqlParametersParamListArgs
                {
                    Name = "max_standby_archive_delay",
                    ExpectedValue = "35000",
                },
            },
        });
    
    });
    
    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.PostgresqlParameters;
    import com.pulumi.tencentcloud.PostgresqlParametersArgs;
    import com.pulumi.tencentcloud.inputs.PostgresqlParametersParamListArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new PostgresqlInstance("example", PostgresqlInstanceArgs.builder()
                .name("tf-example")
                .availabilityZone("ap-guangzhou-6")
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId("vpc-i5yyodl9")
                .subnetId("subnet-hhi88a58")
                .dbMajorVersion("17")
                .engineVersion("17.4")
                .dbKernelVersion("v17.4_r1.4")
                .rootUser("root123")
                .rootPassword("Root123$")
                .charset("UTF8")
                .projectId(0.0)
                .memory(4.0)
                .cpu(2.0)
                .storage(50.0)
                .tags(Map.of("CreateBy", "Terraform"))
                .build());
    
            var examplePostgresqlParameters = new PostgresqlParameters("examplePostgresqlParameters", PostgresqlParametersArgs.builder()
                .dbInstanceId(example.postgresqlInstanceId())
                .paramLists(            
                    PostgresqlParametersParamListArgs.builder()
                        .name("check_function_bodies")
                        .expectedValue("off")
                        .build(),
                    PostgresqlParametersParamListArgs.builder()
                        .name("max_standby_archive_delay")
                        .expectedValue("35000")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:PostgresqlInstance
        properties:
          name: tf-example
          availabilityZone: ap-guangzhou-6
          chargeType: POSTPAID_BY_HOUR
          vpcId: vpc-i5yyodl9
          subnetId: subnet-hhi88a58
          dbMajorVersion: '17'
          engineVersion: '17.4'
          dbKernelVersion: v17.4_r1.4
          rootUser: root123
          rootPassword: Root123$
          charset: UTF8
          projectId: 0
          memory: 4
          cpu: 2
          storage: 50
          tags:
            CreateBy: Terraform
      examplePostgresqlParameters:
        type: tencentcloud:PostgresqlParameters
        name: example
        properties:
          dbInstanceId: ${example.postgresqlInstanceId}
          paramLists:
            - name: check_function_bodies
              expectedValue: off
            - name: max_standby_archive_delay
              expectedValue: '35000'
    

    Create PostgresqlParameters Resource

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

    Constructor syntax

    new PostgresqlParameters(name: string, args: PostgresqlParametersArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresqlParameters(resource_name: str,
                             args: PostgresqlParametersArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresqlParameters(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             db_instance_id: Optional[str] = None,
                             param_lists: Optional[Sequence[PostgresqlParametersParamListArgs]] = None,
                             postgresql_parameters_id: Optional[str] = None)
    func NewPostgresqlParameters(ctx *Context, name string, args PostgresqlParametersArgs, opts ...ResourceOption) (*PostgresqlParameters, error)
    public PostgresqlParameters(string name, PostgresqlParametersArgs args, CustomResourceOptions? opts = null)
    public PostgresqlParameters(String name, PostgresqlParametersArgs args)
    public PostgresqlParameters(String name, PostgresqlParametersArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PostgresqlParameters
    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 PostgresqlParametersArgs
    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 PostgresqlParametersArgs
    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 PostgresqlParametersArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresqlParametersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresqlParametersArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DbInstanceId string
    Instance ID.
    ParamLists List<PostgresqlParametersParamList>
    Parameters to be modified and expected values.
    PostgresqlParametersId string
    ID of the resource.
    DbInstanceId string
    Instance ID.
    ParamLists []PostgresqlParametersParamListArgs
    Parameters to be modified and expected values.
    PostgresqlParametersId string
    ID of the resource.
    dbInstanceId String
    Instance ID.
    paramLists List<PostgresqlParametersParamList>
    Parameters to be modified and expected values.
    postgresqlParametersId String
    ID of the resource.
    dbInstanceId string
    Instance ID.
    paramLists PostgresqlParametersParamList[]
    Parameters to be modified and expected values.
    postgresqlParametersId string
    ID of the resource.
    db_instance_id str
    Instance ID.
    param_lists Sequence[PostgresqlParametersParamListArgs]
    Parameters to be modified and expected values.
    postgresql_parameters_id str
    ID of the resource.
    dbInstanceId String
    Instance ID.
    paramLists List<Property Map>
    Parameters to be modified and expected values.
    postgresqlParametersId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PostgresqlParameters 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 PostgresqlParameters Resource

    Get an existing PostgresqlParameters 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?: PostgresqlParametersState, opts?: CustomResourceOptions): PostgresqlParameters
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_instance_id: Optional[str] = None,
            param_lists: Optional[Sequence[PostgresqlParametersParamListArgs]] = None,
            postgresql_parameters_id: Optional[str] = None) -> PostgresqlParameters
    func GetPostgresqlParameters(ctx *Context, name string, id IDInput, state *PostgresqlParametersState, opts ...ResourceOption) (*PostgresqlParameters, error)
    public static PostgresqlParameters Get(string name, Input<string> id, PostgresqlParametersState? state, CustomResourceOptions? opts = null)
    public static PostgresqlParameters get(String name, Output<String> id, PostgresqlParametersState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlParameters    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.
    ParamLists List<PostgresqlParametersParamList>
    Parameters to be modified and expected values.
    PostgresqlParametersId string
    ID of the resource.
    DbInstanceId string
    Instance ID.
    ParamLists []PostgresqlParametersParamListArgs
    Parameters to be modified and expected values.
    PostgresqlParametersId string
    ID of the resource.
    dbInstanceId String
    Instance ID.
    paramLists List<PostgresqlParametersParamList>
    Parameters to be modified and expected values.
    postgresqlParametersId String
    ID of the resource.
    dbInstanceId string
    Instance ID.
    paramLists PostgresqlParametersParamList[]
    Parameters to be modified and expected values.
    postgresqlParametersId string
    ID of the resource.
    db_instance_id str
    Instance ID.
    param_lists Sequence[PostgresqlParametersParamListArgs]
    Parameters to be modified and expected values.
    postgresql_parameters_id str
    ID of the resource.
    dbInstanceId String
    Instance ID.
    paramLists List<Property Map>
    Parameters to be modified and expected values.
    postgresqlParametersId String
    ID of the resource.

    Supporting Types

    PostgresqlParametersParamList, PostgresqlParametersParamListArgs

    ExpectedValue string
    The new value to which the parameter will be modified. When this parameter is used as an input parameter, its value must be a string, such as 0.1 (decimal), 1000 (integer), and replica (enum).
    Name string
    Parameter name.
    DefaultValue string
    The default value of the parameter. Returned as a string.
    ParamDescriptionCh string
    Parameter Chinese Description.
    ParamDescriptionEn string
    Parameter English Description.
    ExpectedValue string
    The new value to which the parameter will be modified. When this parameter is used as an input parameter, its value must be a string, such as 0.1 (decimal), 1000 (integer), and replica (enum).
    Name string
    Parameter name.
    DefaultValue string
    The default value of the parameter. Returned as a string.
    ParamDescriptionCh string
    Parameter Chinese Description.
    ParamDescriptionEn string
    Parameter English Description.
    expectedValue String
    The new value to which the parameter will be modified. When this parameter is used as an input parameter, its value must be a string, such as 0.1 (decimal), 1000 (integer), and replica (enum).
    name String
    Parameter name.
    defaultValue String
    The default value of the parameter. Returned as a string.
    paramDescriptionCh String
    Parameter Chinese Description.
    paramDescriptionEn String
    Parameter English Description.
    expectedValue string
    The new value to which the parameter will be modified. When this parameter is used as an input parameter, its value must be a string, such as 0.1 (decimal), 1000 (integer), and replica (enum).
    name string
    Parameter name.
    defaultValue string
    The default value of the parameter. Returned as a string.
    paramDescriptionCh string
    Parameter Chinese Description.
    paramDescriptionEn string
    Parameter English Description.
    expected_value str
    The new value to which the parameter will be modified. When this parameter is used as an input parameter, its value must be a string, such as 0.1 (decimal), 1000 (integer), and replica (enum).
    name str
    Parameter name.
    default_value str
    The default value of the parameter. Returned as a string.
    param_description_ch str
    Parameter Chinese Description.
    param_description_en str
    Parameter English Description.
    expectedValue String
    The new value to which the parameter will be modified. When this parameter is used as an input parameter, its value must be a string, such as 0.1 (decimal), 1000 (integer), and replica (enum).
    name String
    Parameter name.
    defaultValue String
    The default value of the parameter. Returned as a string.
    paramDescriptionCh String
    Parameter Chinese Description.
    paramDescriptionEn String
    Parameter English Description.

    Import

    PostgreSQL parameters can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/postgresqlParameters:PostgresqlParameters example postgres-ckwcgdf1
    

    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
    Viewing docs for tencentcloud 1.82.73
    published on Friday, Mar 6, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.