@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
151 lines • 5.29 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.dnatEntriesOutput = exports.dnatEntries = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to query detailed information of dnat entries
* ## 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 fooGateway = new volcengine.nat.Gateway("fooGateway", {
* vpcId: fooVpc.id,
* subnetId: fooSubnet.id,
* spec: "Small",
* natGatewayName: "acc-test-ng",
* description: "acc-test",
* billingType: "PostPaid",
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* });
* const fooAddress = new volcengine.eip.Address("fooAddress", {
* description: "acc-test",
* bandwidth: 1,
* billingType: "PostPaidByBandwidth",
* isp: "BGP",
* });
* const fooAssociate = new volcengine.eip.Associate("fooAssociate", {
* allocationId: fooAddress.id,
* instanceId: fooGateway.id,
* instanceType: "Nat",
* });
* const fooDnatEntry = new volcengine.nat.DnatEntry("fooDnatEntry", {
* dnatEntryName: "acc-test-dnat-entry",
* externalIp: fooAddress.eipAddress,
* externalPort: "80",
* internalIp: "172.16.0.10",
* internalPort: "80",
* natGatewayId: fooGateway.id,
* protocol: "tcp",
* }, {
* dependsOn: [fooAssociate],
* });
* const fooDnatEntries = volcengine.nat.getDnatEntriesOutput({
* ids: [fooDnatEntry.id],
* });
* ```
*/
/** @deprecated volcengine.nat.DnatEntries has been deprecated in favor of volcengine.nat.getDnatEntries */
function dnatEntries(args, opts) {
pulumi.log.warn("dnatEntries is deprecated: volcengine.nat.DnatEntries has been deprecated in favor of volcengine.nat.getDnatEntries");
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("volcengine:nat/dnatEntries:DnatEntries", {
"dnatEntryName": args.dnatEntryName,
"externalIp": args.externalIp,
"externalPort": args.externalPort,
"ids": args.ids,
"internalIp": args.internalIp,
"internalPort": args.internalPort,
"natGatewayId": args.natGatewayId,
"outputFile": args.outputFile,
"protocol": args.protocol,
}, opts);
}
exports.dnatEntries = dnatEntries;
/**
* Use this data source to query detailed information of dnat entries
* ## 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 fooGateway = new volcengine.nat.Gateway("fooGateway", {
* vpcId: fooVpc.id,
* subnetId: fooSubnet.id,
* spec: "Small",
* natGatewayName: "acc-test-ng",
* description: "acc-test",
* billingType: "PostPaid",
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* });
* const fooAddress = new volcengine.eip.Address("fooAddress", {
* description: "acc-test",
* bandwidth: 1,
* billingType: "PostPaidByBandwidth",
* isp: "BGP",
* });
* const fooAssociate = new volcengine.eip.Associate("fooAssociate", {
* allocationId: fooAddress.id,
* instanceId: fooGateway.id,
* instanceType: "Nat",
* });
* const fooDnatEntry = new volcengine.nat.DnatEntry("fooDnatEntry", {
* dnatEntryName: "acc-test-dnat-entry",
* externalIp: fooAddress.eipAddress,
* externalPort: "80",
* internalIp: "172.16.0.10",
* internalPort: "80",
* natGatewayId: fooGateway.id,
* protocol: "tcp",
* }, {
* dependsOn: [fooAssociate],
* });
* const fooDnatEntries = volcengine.nat.getDnatEntriesOutput({
* ids: [fooDnatEntry.id],
* });
* ```
*/
/** @deprecated volcengine.nat.DnatEntries has been deprecated in favor of volcengine.nat.getDnatEntries */
function dnatEntriesOutput(args, opts) {
return pulumi.output(args).apply((a) => dnatEntries(a, opts));
}
exports.dnatEntriesOutput = dnatEntriesOutput;
//# sourceMappingURL=dnatEntries.js.map