Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine
volcengine.mongodb.SslStates
Explore with Pulumi AI
Use this data source to query detailed information of mongodb ssl states
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooInstance = new Volcengine.Mongodb.Instance("fooInstance", new()
{
DbEngineVersion = "MongoDB_4_0",
InstanceType = "ReplicaSet",
SuperAccountPassword = "@acc-test-123",
NodeSpec = "mongo.2c4g",
MongosNodeSpec = "mongo.mongos.2c4g",
InstanceName = "acc-test-mongo-replica",
ChargeType = "PostPaid",
ProjectName = "default",
MongosNodeNumber = 2,
ShardNumber = 3,
StorageSpaceGb = 20,
SubnetId = fooSubnet.Id,
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
Tags = new[]
{
new Volcengine.Mongodb.Inputs.InstanceTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooSslState = new Volcengine.Mongodb.SslState("fooSslState", new()
{
InstanceId = fooInstance.Id,
});
var fooSslStates = Volcengine.Mongodb.SslStates.Invoke(new()
{
InstanceId = fooInstance.Id,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/mongodb"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooInstance, err := mongodb.NewInstance(ctx, "fooInstance", &mongodb.InstanceArgs{
DbEngineVersion: pulumi.String("MongoDB_4_0"),
InstanceType: pulumi.String("ReplicaSet"),
SuperAccountPassword: pulumi.String("@acc-test-123"),
NodeSpec: pulumi.String("mongo.2c4g"),
MongosNodeSpec: pulumi.String("mongo.mongos.2c4g"),
InstanceName: pulumi.String("acc-test-mongo-replica"),
ChargeType: pulumi.String("PostPaid"),
ProjectName: pulumi.String("default"),
MongosNodeNumber: pulumi.Int(2),
ShardNumber: pulumi.Int(3),
StorageSpaceGb: pulumi.Int(20),
SubnetId: fooSubnet.ID(),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
Tags: mongodb.InstanceTagArray{
&mongodb.InstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
_, err = mongodb.NewSslState(ctx, "fooSslState", &mongodb.SslStateArgs{
InstanceId: fooInstance.ID(),
})
if err != nil {
return err
}
_ = mongodb.SslStatesOutput(ctx, mongodb.SslStatesOutputArgs{
InstanceId: fooInstance.ID(),
}, nil)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.mongodb.Instance;
import com.pulumi.volcengine.mongodb.InstanceArgs;
import com.pulumi.volcengine.mongodb.inputs.InstanceTagArgs;
import com.pulumi.volcengine.mongodb.SslState;
import com.pulumi.volcengine.mongodb.SslStateArgs;
import com.pulumi.volcengine.mongodb.MongodbFunctions;
import com.pulumi.volcengine.mongodb.inputs.SslStatesArgs;
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 fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.dbEngineVersion("MongoDB_4_0")
.instanceType("ReplicaSet")
.superAccountPassword("@acc-test-123")
.nodeSpec("mongo.2c4g")
.mongosNodeSpec("mongo.mongos.2c4g")
.instanceName("acc-test-mongo-replica")
.chargeType("PostPaid")
.projectName("default")
.mongosNodeNumber(2)
.shardNumber(3)
.storageSpaceGb(20)
.subnetId(fooSubnet.id())
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.tags(InstanceTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
var fooSslState = new SslState("fooSslState", SslStateArgs.builder()
.instanceId(fooInstance.id())
.build());
final var fooSslStates = MongodbFunctions.SslStates(SslStatesArgs.builder()
.instanceId(fooInstance.id())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_instance = volcengine.mongodb.Instance("fooInstance",
db_engine_version="MongoDB_4_0",
instance_type="ReplicaSet",
super_account_password="@acc-test-123",
node_spec="mongo.2c4g",
mongos_node_spec="mongo.mongos.2c4g",
instance_name="acc-test-mongo-replica",
charge_type="PostPaid",
project_name="default",
mongos_node_number=2,
shard_number=3,
storage_space_gb=20,
subnet_id=foo_subnet.id,
zone_id=foo_zones.zones[0].id,
tags=[volcengine.mongodb.InstanceTagArgs(
key="k1",
value="v1",
)])
foo_ssl_state = volcengine.mongodb.SslState("fooSslState", instance_id=foo_instance.id)
foo_ssl_states = volcengine.mongodb.ssl_states_output(instance_id=foo_instance.id)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooInstance = new volcengine.mongodb.Instance("fooInstance", {
dbEngineVersion: "MongoDB_4_0",
instanceType: "ReplicaSet",
superAccountPassword: "@acc-test-123",
nodeSpec: "mongo.2c4g",
mongosNodeSpec: "mongo.mongos.2c4g",
instanceName: "acc-test-mongo-replica",
chargeType: "PostPaid",
projectName: "default",
mongosNodeNumber: 2,
shardNumber: 3,
storageSpaceGb: 20,
subnetId: fooSubnet.id,
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
tags: [{
key: "k1",
value: "v1",
}],
});
const fooSslState = new volcengine.mongodb.SslState("fooSslState", {instanceId: fooInstance.id});
const fooSslStates = volcengine.mongodb.SslStatesOutput({
instanceId: fooInstance.id,
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooInstance:
type: volcengine:mongodb:Instance
properties:
dbEngineVersion: MongoDB_4_0
instanceType: ReplicaSet
superAccountPassword: '@acc-test-123'
nodeSpec: mongo.2c4g
mongosNodeSpec: mongo.mongos.2c4g
instanceName: acc-test-mongo-replica
chargeType: PostPaid
projectName: default
mongosNodeNumber: 2
shardNumber: 3
storageSpaceGb: 20
subnetId: ${fooSubnet.id}
zoneId: ${fooZones.zones[0].id}
tags:
- key: k1
value: v1
fooSslState:
type: volcengine:mongodb:SslState
properties:
instanceId: ${fooInstance.id}
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
fooSslStates:
fn::invoke:
Function: volcengine:mongodb:SslStates
Arguments:
instanceId: ${fooInstance.id}
Using SslStates
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function sslStates(args: SslStatesArgs, opts?: InvokeOptions): Promise<SslStatesResult>
function sslStatesOutput(args: SslStatesOutputArgs, opts?: InvokeOptions): Output<SslStatesResult>
def ssl_states(instance_id: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> SslStatesResult
def ssl_states_output(instance_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[SslStatesResult]
func SslStates(ctx *Context, args *SslStatesArgs, opts ...InvokeOption) (*SslStatesResult, error)
func SslStatesOutput(ctx *Context, args *SslStatesOutputArgs, opts ...InvokeOption) SslStatesResultOutput
public static class SslStates
{
public static Task<SslStatesResult> InvokeAsync(SslStatesArgs args, InvokeOptions? opts = null)
public static Output<SslStatesResult> Invoke(SslStatesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<SslStatesResult> sslStates(SslStatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:mongodb:SslStates
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The mongodb instance ID to query.
- Output
File string - File name where to save data source results.
- Instance
Id string - The mongodb instance ID to query.
- Output
File string - File name where to save data source results.
- instance
Id String - The mongodb instance ID to query.
- output
File String - File name where to save data source results.
- instance
Id string - The mongodb instance ID to query.
- output
File string - File name where to save data source results.
- instance_
id str - The mongodb instance ID to query.
- output_
file str - File name where to save data source results.
- instance
Id String - The mongodb instance ID to query.
- output
File String - File name where to save data source results.
SslStates Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The mongodb instance id.
- Ssl
States List<SslStates Ssl State> - The collection of mongodb ssl state query.
- Total
Count int - The total count of mongodb ssl state query.
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The mongodb instance id.
- Ssl
States []SslStates Ssl State - The collection of mongodb ssl state query.
- Total
Count int - The total count of mongodb ssl state query.
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The mongodb instance id.
- ssl
States List<SslStates Ssl State> - The collection of mongodb ssl state query.
- total
Count Integer - The total count of mongodb ssl state query.
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - The mongodb instance id.
- ssl
States SslStates Ssl State[] - The collection of mongodb ssl state query.
- total
Count number - The total count of mongodb ssl state query.
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - The mongodb instance id.
- ssl_
states Sequence[SslStates Ssl State] - The collection of mongodb ssl state query.
- total_
count int - The total count of mongodb ssl state query.
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The mongodb instance id.
- ssl
States List<Property Map> - The collection of mongodb ssl state query.
- total
Count Number - The total count of mongodb ssl state query.
- output
File String
Supporting Types
SslStatesSslState
- Instance
Id string - The mongodb instance ID to query.
- Is
Valid bool - Whetehr SSL is valid.
- Ssl
Enable bool - Whether SSL is enabled.
- Ssl
Expired stringTime - The expire time of SSL.
- Instance
Id string - The mongodb instance ID to query.
- Is
Valid bool - Whetehr SSL is valid.
- Ssl
Enable bool - Whether SSL is enabled.
- Ssl
Expired stringTime - The expire time of SSL.
- instance
Id String - The mongodb instance ID to query.
- is
Valid Boolean - Whetehr SSL is valid.
- ssl
Enable Boolean - Whether SSL is enabled.
- ssl
Expired StringTime - The expire time of SSL.
- instance
Id string - The mongodb instance ID to query.
- is
Valid boolean - Whetehr SSL is valid.
- ssl
Enable boolean - Whether SSL is enabled.
- ssl
Expired stringTime - The expire time of SSL.
- instance_
id str - The mongodb instance ID to query.
- is_
valid bool - Whetehr SSL is valid.
- ssl_
enable bool - Whether SSL is enabled.
- ssl_
expired_ strtime - The expire time of SSL.
- instance
Id String - The mongodb instance ID to query.
- is
Valid Boolean - Whetehr SSL is valid.
- ssl
Enable Boolean - Whether SSL is enabled.
- ssl
Expired StringTime - The expire time of SSL.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.