@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
152 lines (151 loc) • 4.53 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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,
* });
* ```
*/
export declare function getCustomerGateway(args?: GetCustomerGatewayArgs, opts?: pulumi.InvokeOptions): Promise<GetCustomerGatewayResult>;
/**
* A collection of arguments for invoking getCustomerGateway.
*/
export interface GetCustomerGatewayArgs {
/**
* One or more [name-value pairs][dcg-filters] to filter by.
*
* [dcg-filters]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeCustomerGateways.html
*/
filters?: inputs.ec2.GetCustomerGatewayFilter[];
/**
* ID of the gateway.
*/
id?: string;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
/**
* Map of key-value pairs assigned to the gateway.
*/
tags?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getCustomerGateway.
*/
export interface GetCustomerGatewayResult {
/**
* ARN of the customer gateway.
*/
readonly arn: string;
/**
* Gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
*/
readonly bgpAsn: number;
/**
* Gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
*/
readonly bgpAsnExtended: number;
/**
* ARN for the customer gateway certificate.
*/
readonly certificateArn: string;
/**
* Name for the customer gateway device.
*/
readonly deviceName: string;
readonly filters?: outputs.ec2.GetCustomerGatewayFilter[];
readonly id: string;
/**
* IP address of the gateway's Internet-routable external interface.
*/
readonly ipAddress: string;
readonly region: string;
/**
* Map of key-value pairs assigned to the gateway.
*/
readonly tags: {
[key: string]: string;
};
/**
* Type of customer gateway. The only type AWS supports at this time is "ipsec.1".
*/
readonly type: string;
}
/**
* 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,
* });
* ```
*/
export declare function getCustomerGatewayOutput(args?: GetCustomerGatewayOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCustomerGatewayResult>;
/**
* A collection of arguments for invoking getCustomerGateway.
*/
export interface GetCustomerGatewayOutputArgs {
/**
* One or more [name-value pairs][dcg-filters] to filter by.
*
* [dcg-filters]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeCustomerGateways.html
*/
filters?: pulumi.Input<pulumi.Input<inputs.ec2.GetCustomerGatewayFilterArgs>[]>;
/**
* ID of the gateway.
*/
id?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Map of key-value pairs assigned to the gateway.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}