"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.endpointsOutput = exports.endpoints = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Use this data source to query detailed information of mongodb endpoints
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooZones = volcengine.ecs.getZones({});
 * 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: "ShardedCluster",
 *     superAccountPassword: "@acc-test-123",
 *     nodeSpec: "mongo.shard.1c2g",
 *     mongosNodeSpec: "mongo.mongos.1c2g",
 *     instanceName: "acc-test-mongo-shard",
 *     chargeType: "PostPaid",
 *     projectName: "default",
 *     mongosNodeNumber: 2,
 *     shardNumber: 2,
 *     storageSpaceGb: 20,
 *     subnetId: fooSubnet.id,
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * const fooAddress: volcengine.eip.Address[] = [];
 * for (const range = {value: 0}; range.value < 2; range.value++) {
 *     fooAddress.push(new volcengine.eip.Address(`fooAddress-${range.value}`, {
 *         billingType: "PostPaidByBandwidth",
 *         bandwidth: 1,
 *         isp: "ChinaUnicom",
 *         description: "acc-test",
 *         projectName: "default",
 *     }));
 * }
 * const fooPublic = new volcengine.mongodb.Endpoint("fooPublic", {
 *     instanceId: fooInstance.id,
 *     networkType: "Public",
 *     objectId: fooInstance.mongosId,
 *     mongosNodeIds: [
 *         fooInstance.mongos.apply(mongos => mongos[0].mongosNodeId),
 *         fooInstance.mongos.apply(mongos => mongos[1].mongosNodeId),
 *     ],
 *     eipIds: fooAddress.map(__item => __item.id),
 * });
 * const fooPrivate = new volcengine.mongodb.Endpoint("fooPrivate", {
 *     instanceId: fooInstance.id,
 *     networkType: "Private",
 *     objectId: fooInstance.configServersId,
 * });
 * const fooEndpoints = volcengine.mongodb.getEndpointsOutput({
 *     instanceId: fooInstance.id,
 * });
 * ```
 */
/** @deprecated volcengine.mongodb.Endpoints has been deprecated in favor of volcengine.mongodb.getEndpoints */
function endpoints(args, opts) {
    pulumi.log.warn("endpoints is deprecated: volcengine.mongodb.Endpoints has been deprecated in favor of volcengine.mongodb.getEndpoints");
    args = args || {};
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invoke("volcengine:mongodb/endpoints:Endpoints", {
        "instanceId": args.instanceId,
        "outputFile": args.outputFile,
    }, opts);
}
exports.endpoints = endpoints;
/**
 * Use this data source to query detailed information of mongodb endpoints
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooZones = volcengine.ecs.getZones({});
 * 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: "ShardedCluster",
 *     superAccountPassword: "@acc-test-123",
 *     nodeSpec: "mongo.shard.1c2g",
 *     mongosNodeSpec: "mongo.mongos.1c2g",
 *     instanceName: "acc-test-mongo-shard",
 *     chargeType: "PostPaid",
 *     projectName: "default",
 *     mongosNodeNumber: 2,
 *     shardNumber: 2,
 *     storageSpaceGb: 20,
 *     subnetId: fooSubnet.id,
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * const fooAddress: volcengine.eip.Address[] = [];
 * for (const range = {value: 0}; range.value < 2; range.value++) {
 *     fooAddress.push(new volcengine.eip.Address(`fooAddress-${range.value}`, {
 *         billingType: "PostPaidByBandwidth",
 *         bandwidth: 1,
 *         isp: "ChinaUnicom",
 *         description: "acc-test",
 *         projectName: "default",
 *     }));
 * }
 * const fooPublic = new volcengine.mongodb.Endpoint("fooPublic", {
 *     instanceId: fooInstance.id,
 *     networkType: "Public",
 *     objectId: fooInstance.mongosId,
 *     mongosNodeIds: [
 *         fooInstance.mongos.apply(mongos => mongos[0].mongosNodeId),
 *         fooInstance.mongos.apply(mongos => mongos[1].mongosNodeId),
 *     ],
 *     eipIds: fooAddress.map(__item => __item.id),
 * });
 * const fooPrivate = new volcengine.mongodb.Endpoint("fooPrivate", {
 *     instanceId: fooInstance.id,
 *     networkType: "Private",
 *     objectId: fooInstance.configServersId,
 * });
 * const fooEndpoints = volcengine.mongodb.getEndpointsOutput({
 *     instanceId: fooInstance.id,
 * });
 * ```
 */
/** @deprecated volcengine.mongodb.Endpoints has been deprecated in favor of volcengine.mongodb.getEndpoints */
function endpointsOutput(args, opts) {
    return pulumi.output(args).apply((a) => endpoints(a, opts));
}
exports.endpointsOutput = endpointsOutput;
//# sourceMappingURL=endpoints.js.map