UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

98 lines 3.62 kB
"use strict"; // *** 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.getVpnAttachmentOutput = exports.getVpnAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Get information on an EC2 Transit Gateway VPN Attachment. * * > EC2 Transit Gateway VPN Attachments are implicitly created by VPN Connections referencing an EC2 Transit Gateway so there is no managed resource. For ease, the `aws.ec2.VpnConnection` resource includes a `transitGatewayAttachmentId` attribute which can replace some usage of this data source. For tagging the attachment, see the `aws.ec2.Tag` resource. * * ## Example Usage * * ### By Transit Gateway and VPN Connection Identifiers * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2transitgateway.getVpnAttachment({ * transitGatewayId: exampleAwsEc2TransitGateway.id, * vpnConnectionId: exampleAwsVpnConnection.id, * }); * ``` * * ### Filter * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = aws.ec2transitgateway.getVpnAttachment({ * filters: [{ * name: "resource-id", * values: ["some-resource"], * }], * }); * ``` */ function getVpnAttachment(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:ec2transitgateway/getVpnAttachment:getVpnAttachment", { "filters": args.filters, "region": args.region, "tags": args.tags, "transitGatewayId": args.transitGatewayId, "vpnConnectionId": args.vpnConnectionId, }, opts); } exports.getVpnAttachment = getVpnAttachment; /** * Get information on an EC2 Transit Gateway VPN Attachment. * * > EC2 Transit Gateway VPN Attachments are implicitly created by VPN Connections referencing an EC2 Transit Gateway so there is no managed resource. For ease, the `aws.ec2.VpnConnection` resource includes a `transitGatewayAttachmentId` attribute which can replace some usage of this data source. For tagging the attachment, see the `aws.ec2.Tag` resource. * * ## Example Usage * * ### By Transit Gateway and VPN Connection Identifiers * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2transitgateway.getVpnAttachment({ * transitGatewayId: exampleAwsEc2TransitGateway.id, * vpnConnectionId: exampleAwsVpnConnection.id, * }); * ``` * * ### Filter * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = aws.ec2transitgateway.getVpnAttachment({ * filters: [{ * name: "resource-id", * values: ["some-resource"], * }], * }); * ``` */ function getVpnAttachmentOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:ec2transitgateway/getVpnAttachment:getVpnAttachment", { "filters": args.filters, "region": args.region, "tags": args.tags, "transitGatewayId": args.transitGatewayId, "vpnConnectionId": args.vpnConnectionId, }, opts); } exports.getVpnAttachmentOutput = getVpnAttachmentOutput; //# sourceMappingURL=getVpnAttachment.js.map