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

tencentcloud.PostgresqlInstanceSslConfig

Explore with Pulumi AI

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

    Provides a resource to create a postgres instance ssl config

    NOTE: If ssl_enabled is false, Please do not set connect_address field.

    Example Usage

    Enable ssl config

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.PostgresqlInstanceSslConfig("example", {
        connectAddress: "10.0.0.12",
        dbInstanceId: "postgres-5wux9sub",
        sslEnabled: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.PostgresqlInstanceSslConfig("example",
        connect_address="10.0.0.12",
        db_instance_id="postgres-5wux9sub",
        ssl_enabled=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewPostgresqlInstanceSslConfig(ctx, "example", &tencentcloud.PostgresqlInstanceSslConfigArgs{
    			ConnectAddress: pulumi.String("10.0.0.12"),
    			DbInstanceId:   pulumi.String("postgres-5wux9sub"),
    			SslEnabled:     pulumi.Bool(true),
    		})
    		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.PostgresqlInstanceSslConfig("example", new()
        {
            ConnectAddress = "10.0.0.12",
            DbInstanceId = "postgres-5wux9sub",
            SslEnabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlInstanceSslConfig;
    import com.pulumi.tencentcloud.PostgresqlInstanceSslConfigArgs;
    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 PostgresqlInstanceSslConfig("example", PostgresqlInstanceSslConfigArgs.builder()
                .connectAddress("10.0.0.12")
                .dbInstanceId("postgres-5wux9sub")
                .sslEnabled(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:PostgresqlInstanceSslConfig
        properties:
          connectAddress: 10.0.0.12
          dbInstanceId: postgres-5wux9sub
          sslEnabled: true
    

    Disable ssl config

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.PostgresqlInstanceSslConfig("example", {
        dbInstanceId: "postgres-5wux9sub",
        sslEnabled: false,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.PostgresqlInstanceSslConfig("example",
        db_instance_id="postgres-5wux9sub",
        ssl_enabled=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewPostgresqlInstanceSslConfig(ctx, "example", &tencentcloud.PostgresqlInstanceSslConfigArgs{
    			DbInstanceId: pulumi.String("postgres-5wux9sub"),
    			SslEnabled:   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 example = new Tencentcloud.PostgresqlInstanceSslConfig("example", new()
        {
            DbInstanceId = "postgres-5wux9sub",
            SslEnabled = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlInstanceSslConfig;
    import com.pulumi.tencentcloud.PostgresqlInstanceSslConfigArgs;
    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 PostgresqlInstanceSslConfig("example", PostgresqlInstanceSslConfigArgs.builder()
                .dbInstanceId("postgres-5wux9sub")
                .sslEnabled(false)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:PostgresqlInstanceSslConfig
        properties:
          dbInstanceId: postgres-5wux9sub
          sslEnabled: false
    

    Create PostgresqlInstanceSslConfig Resource

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

    Constructor syntax

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

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

    DbInstanceId string
    Postgres instance ID.
    SslEnabled bool
    Enable or disable SSL. true: enable; false: disable.
    ConnectAddress string
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    PostgresqlInstanceSslConfigId string
    ID of the resource.
    DbInstanceId string
    Postgres instance ID.
    SslEnabled bool
    Enable or disable SSL. true: enable; false: disable.
    ConnectAddress string
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    PostgresqlInstanceSslConfigId string
    ID of the resource.
    dbInstanceId String
    Postgres instance ID.
    sslEnabled Boolean
    Enable or disable SSL. true: enable; false: disable.
    connectAddress String
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    postgresqlInstanceSslConfigId String
    ID of the resource.
    dbInstanceId string
    Postgres instance ID.
    sslEnabled boolean
    Enable or disable SSL. true: enable; false: disable.
    connectAddress string
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    postgresqlInstanceSslConfigId string
    ID of the resource.
    db_instance_id str
    Postgres instance ID.
    ssl_enabled bool
    Enable or disable SSL. true: enable; false: disable.
    connect_address str
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    postgresql_instance_ssl_config_id str
    ID of the resource.
    dbInstanceId String
    Postgres instance ID.
    sslEnabled Boolean
    Enable or disable SSL. true: enable; false: disable.
    connectAddress String
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    postgresqlInstanceSslConfigId String
    ID of the resource.

    Outputs

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

    CaUrl string
    Cloud root certificate download link.
    Id string
    The provider-assigned unique ID for this managed resource.
    CaUrl string
    Cloud root certificate download link.
    Id string
    The provider-assigned unique ID for this managed resource.
    caUrl String
    Cloud root certificate download link.
    id String
    The provider-assigned unique ID for this managed resource.
    caUrl string
    Cloud root certificate download link.
    id string
    The provider-assigned unique ID for this managed resource.
    ca_url str
    Cloud root certificate download link.
    id str
    The provider-assigned unique ID for this managed resource.
    caUrl String
    Cloud root certificate download link.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PostgresqlInstanceSslConfig Resource

    Get an existing PostgresqlInstanceSslConfig 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?: PostgresqlInstanceSslConfigState, opts?: CustomResourceOptions): PostgresqlInstanceSslConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ca_url: Optional[str] = None,
            connect_address: Optional[str] = None,
            db_instance_id: Optional[str] = None,
            postgresql_instance_ssl_config_id: Optional[str] = None,
            ssl_enabled: Optional[bool] = None) -> PostgresqlInstanceSslConfig
    func GetPostgresqlInstanceSslConfig(ctx *Context, name string, id IDInput, state *PostgresqlInstanceSslConfigState, opts ...ResourceOption) (*PostgresqlInstanceSslConfig, error)
    public static PostgresqlInstanceSslConfig Get(string name, Input<string> id, PostgresqlInstanceSslConfigState? state, CustomResourceOptions? opts = null)
    public static PostgresqlInstanceSslConfig get(String name, Output<String> id, PostgresqlInstanceSslConfigState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlInstanceSslConfig    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:
    CaUrl string
    Cloud root certificate download link.
    ConnectAddress string
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    DbInstanceId string
    Postgres instance ID.
    PostgresqlInstanceSslConfigId string
    ID of the resource.
    SslEnabled bool
    Enable or disable SSL. true: enable; false: disable.
    CaUrl string
    Cloud root certificate download link.
    ConnectAddress string
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    DbInstanceId string
    Postgres instance ID.
    PostgresqlInstanceSslConfigId string
    ID of the resource.
    SslEnabled bool
    Enable or disable SSL. true: enable; false: disable.
    caUrl String
    Cloud root certificate download link.
    connectAddress String
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    dbInstanceId String
    Postgres instance ID.
    postgresqlInstanceSslConfigId String
    ID of the resource.
    sslEnabled Boolean
    Enable or disable SSL. true: enable; false: disable.
    caUrl string
    Cloud root certificate download link.
    connectAddress string
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    dbInstanceId string
    Postgres instance ID.
    postgresqlInstanceSslConfigId string
    ID of the resource.
    sslEnabled boolean
    Enable or disable SSL. true: enable; false: disable.
    ca_url str
    Cloud root certificate download link.
    connect_address str
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    db_instance_id str
    Postgres instance ID.
    postgresql_instance_ssl_config_id str
    ID of the resource.
    ssl_enabled bool
    Enable or disable SSL. true: enable; false: disable.
    caUrl String
    Cloud root certificate download link.
    connectAddress String
    The unique connection address protected by SSL certificate, which can be set as the internal and external IP address if it is the primary instance; If it is a read-only instance, it can be set as the instance IP or read-only group IP. This parameter is mandatory when enabling SSL or modifying SSL protected connection addresses; When SSL is turned off, this parameter will be ignored.
    dbInstanceId String
    Postgres instance ID.
    postgresqlInstanceSslConfigId String
    ID of the resource.
    sslEnabled Boolean
    Enable or disable SSL. true: enable; false: disable.

    Import

    postgres instance ssl config can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/postgresqlInstanceSslConfig:PostgresqlInstanceSslConfig example postgres-5wux9sub
    

    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