@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
157 lines • 5.49 kB
JavaScript
"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.getConnectionsOutput = exports.getConnections = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to query detailed information of vpn connections
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* 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: "cn-beijing-a",
* vpcId: fooVpc.id,
* });
* const fooGateway = new volcengine.vpn.Gateway("fooGateway", {
* vpcId: fooVpc.id,
* subnetId: fooSubnet.id,
* bandwidth: 20,
* vpnGatewayName: "acc-test",
* description: "acc-test",
* period: 2,
* projectName: "default",
* });
* const fooCustomerGateway = new volcengine.vpn.CustomerGateway("fooCustomerGateway", {
* ipAddress: "192.0.1.3",
* customerGatewayName: "acc-test",
* description: "acc-test",
* projectName: "default",
* });
* const fooConnection = new volcengine.vpn.Connection("fooConnection", {
* vpnConnectionName: "acc-tf-test",
* description: "acc-tf-test",
* vpnGatewayId: fooGateway.id,
* customerGatewayId: fooCustomerGateway.id,
* localSubnets: ["192.168.0.0/22"],
* remoteSubnets: ["192.161.0.0/20"],
* dpdAction: "none",
* natTraversal: true,
* ikeConfigPsk: "acctest@!3",
* ikeConfigVersion: "ikev1",
* ikeConfigMode: "main",
* ikeConfigEncAlg: "aes",
* ikeConfigAuthAlg: "md5",
* ikeConfigDhGroup: "group2",
* ikeConfigLifetime: 9000,
* ikeConfigLocalId: "acc_test",
* ikeConfigRemoteId: "acc_test",
* ipsecConfigEncAlg: "aes",
* ipsecConfigAuthAlg: "sha256",
* ipsecConfigDhGroup: "group2",
* ipsecConfigLifetime: 9000,
* projectName: "default",
* });
* const fooConnections = volcengine.vpn.getConnectionsOutput({
* ids: [fooConnection.id],
* });
* ```
*/
function getConnections(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("volcengine:vpn/getConnections:getConnections", {
"attachStatus": args.attachStatus,
"attachType": args.attachType,
"customerGatewayId": args.customerGatewayId,
"ids": args.ids,
"nameRegex": args.nameRegex,
"outputFile": args.outputFile,
"projectName": args.projectName,
"spec": args.spec,
"status": args.status,
"transitRouterId": args.transitRouterId,
"vpnConnectionNames": args.vpnConnectionNames,
"vpnGatewayId": args.vpnGatewayId,
}, opts);
}
exports.getConnections = getConnections;
/**
* Use this data source to query detailed information of vpn connections
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* 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: "cn-beijing-a",
* vpcId: fooVpc.id,
* });
* const fooGateway = new volcengine.vpn.Gateway("fooGateway", {
* vpcId: fooVpc.id,
* subnetId: fooSubnet.id,
* bandwidth: 20,
* vpnGatewayName: "acc-test",
* description: "acc-test",
* period: 2,
* projectName: "default",
* });
* const fooCustomerGateway = new volcengine.vpn.CustomerGateway("fooCustomerGateway", {
* ipAddress: "192.0.1.3",
* customerGatewayName: "acc-test",
* description: "acc-test",
* projectName: "default",
* });
* const fooConnection = new volcengine.vpn.Connection("fooConnection", {
* vpnConnectionName: "acc-tf-test",
* description: "acc-tf-test",
* vpnGatewayId: fooGateway.id,
* customerGatewayId: fooCustomerGateway.id,
* localSubnets: ["192.168.0.0/22"],
* remoteSubnets: ["192.161.0.0/20"],
* dpdAction: "none",
* natTraversal: true,
* ikeConfigPsk: "acctest@!3",
* ikeConfigVersion: "ikev1",
* ikeConfigMode: "main",
* ikeConfigEncAlg: "aes",
* ikeConfigAuthAlg: "md5",
* ikeConfigDhGroup: "group2",
* ikeConfigLifetime: 9000,
* ikeConfigLocalId: "acc_test",
* ikeConfigRemoteId: "acc_test",
* ipsecConfigEncAlg: "aes",
* ipsecConfigAuthAlg: "sha256",
* ipsecConfigDhGroup: "group2",
* ipsecConfigLifetime: 9000,
* projectName: "default",
* });
* const fooConnections = volcengine.vpn.getConnectionsOutput({
* ids: [fooConnection.id],
* });
* ```
*/
function getConnectionsOutput(args, opts) {
return pulumi.output(args).apply((a) => getConnections(a, opts));
}
exports.getConnectionsOutput = getConnectionsOutput;
//# sourceMappingURL=getConnections.js.map