1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. MongodbInstanceSsl
tencentcloud 1.82.45 published on Tuesday, Dec 16, 2025 by tencentcloudstack
tencentcloud logo
tencentcloud 1.82.45 published on Tuesday, Dec 16, 2025 by tencentcloudstack

    Provides a resource to manage MongoDB instance SSL configuration.

    NOTE: This resource is used to enable or disable SSL for MongoDB instances. When the resource is destroyed, SSL will be disabled automatically.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.MongodbInstanceSsl("example", {
        instanceId: "cmgo-xxxxxxxx",
        enable: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.MongodbInstanceSsl("example",
        instance_id="cmgo-xxxxxxxx",
        enable=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.NewMongodbInstanceSsl(ctx, "example", &tencentcloud.MongodbInstanceSslArgs{
    			InstanceId: pulumi.String("cmgo-xxxxxxxx"),
    			Enable:     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.MongodbInstanceSsl("example", new()
        {
            InstanceId = "cmgo-xxxxxxxx",
            Enable = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.MongodbInstanceSsl;
    import com.pulumi.tencentcloud.MongodbInstanceSslArgs;
    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 MongodbInstanceSsl("example", MongodbInstanceSslArgs.builder()
                .instanceId("cmgo-xxxxxxxx")
                .enable(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:MongodbInstanceSsl
        properties:
          instanceId: cmgo-xxxxxxxx
          enable: true
    

    Create MongodbInstanceSsl Resource

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

    Constructor syntax

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

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

    Enable bool
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    InstanceId string
    Instance ID, for example: cmgo-p8vnipr5.
    MongodbInstanceSslId string
    ID of the resource.
    Enable bool
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    InstanceId string
    Instance ID, for example: cmgo-p8vnipr5.
    MongodbInstanceSslId string
    ID of the resource.
    enable Boolean
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    instanceId String
    Instance ID, for example: cmgo-p8vnipr5.
    mongodbInstanceSslId String
    ID of the resource.
    enable boolean
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    instanceId string
    Instance ID, for example: cmgo-p8vnipr5.
    mongodbInstanceSslId string
    ID of the resource.
    enable bool
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    instance_id str
    Instance ID, for example: cmgo-p8vnipr5.
    mongodb_instance_ssl_id str
    ID of the resource.
    enable Boolean
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    instanceId String
    Instance ID, for example: cmgo-p8vnipr5.
    mongodbInstanceSslId String
    ID of the resource.

    Outputs

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

    CertUrl string
    Certificate download link. This field is only available when SSL is enabled.
    ExpiredTime string
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status double
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    CertUrl string
    Certificate download link. This field is only available when SSL is enabled.
    ExpiredTime string
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status float64
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    certUrl String
    Certificate download link. This field is only available when SSL is enabled.
    expiredTime String
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    status Double
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    certUrl string
    Certificate download link. This field is only available when SSL is enabled.
    expiredTime string
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    id string
    The provider-assigned unique ID for this managed resource.
    status number
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    cert_url str
    Certificate download link. This field is only available when SSL is enabled.
    expired_time str
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    id str
    The provider-assigned unique ID for this managed resource.
    status float
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    certUrl String
    Certificate download link. This field is only available when SSL is enabled.
    expiredTime String
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    status Number
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.

    Look up Existing MongodbInstanceSsl Resource

    Get an existing MongodbInstanceSsl 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?: MongodbInstanceSslState, opts?: CustomResourceOptions): MongodbInstanceSsl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cert_url: Optional[str] = None,
            enable: Optional[bool] = None,
            expired_time: Optional[str] = None,
            instance_id: Optional[str] = None,
            mongodb_instance_ssl_id: Optional[str] = None,
            status: Optional[float] = None) -> MongodbInstanceSsl
    func GetMongodbInstanceSsl(ctx *Context, name string, id IDInput, state *MongodbInstanceSslState, opts ...ResourceOption) (*MongodbInstanceSsl, error)
    public static MongodbInstanceSsl Get(string name, Input<string> id, MongodbInstanceSslState? state, CustomResourceOptions? opts = null)
    public static MongodbInstanceSsl get(String name, Output<String> id, MongodbInstanceSslState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MongodbInstanceSsl    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:
    CertUrl string
    Certificate download link. This field is only available when SSL is enabled.
    Enable bool
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    ExpiredTime string
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    InstanceId string
    Instance ID, for example: cmgo-p8vnipr5.
    MongodbInstanceSslId string
    ID of the resource.
    Status double
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    CertUrl string
    Certificate download link. This field is only available when SSL is enabled.
    Enable bool
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    ExpiredTime string
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    InstanceId string
    Instance ID, for example: cmgo-p8vnipr5.
    MongodbInstanceSslId string
    ID of the resource.
    Status float64
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    certUrl String
    Certificate download link. This field is only available when SSL is enabled.
    enable Boolean
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    expiredTime String
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    instanceId String
    Instance ID, for example: cmgo-p8vnipr5.
    mongodbInstanceSslId String
    ID of the resource.
    status Double
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    certUrl string
    Certificate download link. This field is only available when SSL is enabled.
    enable boolean
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    expiredTime string
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    instanceId string
    Instance ID, for example: cmgo-p8vnipr5.
    mongodbInstanceSslId string
    ID of the resource.
    status number
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    cert_url str
    Certificate download link. This field is only available when SSL is enabled.
    enable bool
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    expired_time str
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    instance_id str
    Instance ID, for example: cmgo-p8vnipr5.
    mongodb_instance_ssl_id str
    ID of the resource.
    status float
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.
    certUrl String
    Certificate download link. This field is only available when SSL is enabled.
    enable Boolean
    Whether to enable SSL. Valid values: true - enable SSL, false - disable SSL.
    expiredTime String
    Certificate expiration time, format: 2023-05-01 12:00:00. This field is only available when SSL is enabled.
    instanceId String
    Instance ID, for example: cmgo-p8vnipr5.
    mongodbInstanceSslId String
    ID of the resource.
    status Number
    SSL status. Valid values: 0 - SSL is disabled, 1 - SSL is enabled.

    Import

    MongoDB instance SSL configuration can be imported using the instance id, e.g.

    $ pulumi import tencentcloud:index/mongodbInstanceSsl:MongodbInstanceSsl example cmgo-xxxxxxxx
    

    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.82.45 published on Tuesday, Dec 16, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate