@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
84 lines • 2.59 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCustomerGatewayOutput = exports.getCustomerGateway = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Get an existing AWS Customer Gateway.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = aws.ec2.getCustomerGateway({
* filters: [{
* name: "tag:Name",
* values: ["foo-prod"],
* }],
* });
* const main = new aws.ec2.VpnGateway("main", {
* vpcId: mainAwsVpc.id,
* amazonSideAsn: "7224",
* });
* const transit = new aws.ec2.VpnConnection("transit", {
* vpnGatewayId: main.id,
* customerGatewayId: foo.then(foo => foo.id),
* type: foo.then(foo => foo.type),
* staticRoutesOnly: false,
* });
* ```
*/
function getCustomerGateway(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ec2/getCustomerGateway:getCustomerGateway", {
"filters": args.filters,
"id": args.id,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getCustomerGateway = getCustomerGateway;
/**
* Get an existing AWS Customer Gateway.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = aws.ec2.getCustomerGateway({
* filters: [{
* name: "tag:Name",
* values: ["foo-prod"],
* }],
* });
* const main = new aws.ec2.VpnGateway("main", {
* vpcId: mainAwsVpc.id,
* amazonSideAsn: "7224",
* });
* const transit = new aws.ec2.VpnConnection("transit", {
* vpnGatewayId: main.id,
* customerGatewayId: foo.then(foo => foo.id),
* type: foo.then(foo => foo.type),
* staticRoutesOnly: false,
* });
* ```
*/
function getCustomerGatewayOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ec2/getCustomerGateway:getCustomerGateway", {
"filters": args.filters,
"id": args.id,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getCustomerGatewayOutput = getCustomerGatewayOutput;
//# sourceMappingURL=getCustomerGateway.js.map