tencentcloud.PostgresqlInstanceSslConfig
Explore with Pulumi AI
Provides a resource to create a postgres instance ssl config
NOTE: If
ssl_enabled
isfalse
, Please do not setconnect_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:
- Db
Instance stringId - Postgres instance ID.
- Ssl
Enabled bool - Enable or disable SSL. true: enable; false: disable.
- Connect
Address 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.
- Postgresql
Instance stringSsl Config Id - ID of the resource.
- Db
Instance stringId - Postgres instance ID.
- Ssl
Enabled bool - Enable or disable SSL. true: enable; false: disable.
- Connect
Address 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.
- Postgresql
Instance stringSsl Config Id - ID of the resource.
- db
Instance StringId - Postgres instance ID.
- ssl
Enabled Boolean - Enable or disable SSL. true: enable; false: disable.
- connect
Address 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.
- postgresql
Instance StringSsl Config Id - ID of the resource.
- db
Instance stringId - Postgres instance ID.
- ssl
Enabled boolean - Enable or disable SSL. true: enable; false: disable.
- connect
Address 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.
- postgresql
Instance stringSsl Config Id - ID of the resource.
- db_
instance_ strid - 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_ strssl_ config_ id - ID of the resource.
- db
Instance StringId - Postgres instance ID.
- ssl
Enabled Boolean - Enable or disable SSL. true: enable; false: disable.
- connect
Address 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.
- postgresql
Instance StringSsl Config Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlInstanceSslConfig resource produces the following output properties:
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.
- Ca
Url string - Cloud root certificate download link.
- Connect
Address 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.
- Db
Instance stringId - Postgres instance ID.
- Postgresql
Instance stringSsl Config Id - ID of the resource.
- Ssl
Enabled bool - Enable or disable SSL. true: enable; false: disable.
- Ca
Url string - Cloud root certificate download link.
- Connect
Address 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.
- Db
Instance stringId - Postgres instance ID.
- Postgresql
Instance stringSsl Config Id - ID of the resource.
- Ssl
Enabled bool - Enable or disable SSL. true: enable; false: disable.
- ca
Url String - Cloud root certificate download link.
- connect
Address 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.
- db
Instance StringId - Postgres instance ID.
- postgresql
Instance StringSsl Config Id - ID of the resource.
- ssl
Enabled Boolean - Enable or disable SSL. true: enable; false: disable.
- ca
Url string - Cloud root certificate download link.
- connect
Address 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.
- db
Instance stringId - Postgres instance ID.
- postgresql
Instance stringSsl Config Id - ID of the resource.
- ssl
Enabled 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_ strid - Postgres instance ID.
- postgresql_
instance_ strssl_ config_ id - ID of the resource.
- ssl_
enabled bool - Enable or disable SSL. true: enable; false: disable.
- ca
Url String - Cloud root certificate download link.
- connect
Address 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.
- db
Instance StringId - Postgres instance ID.
- postgresql
Instance StringSsl Config Id - ID of the resource.
- ssl
Enabled 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.