UNPKG

@pulumi/aws

Version:

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

70 lines 3.66 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.getDirectConnectGatewayAttachmentOutput = exports.getDirectConnectGatewayAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Get information on an EC2 Transit Gateway's attachment to a Direct Connect Gateway. * * !> **Warning:** Using the `aws.ec2transitgateway.getDirectConnectGatewayAttachment` data source in combination with `aws.ec2transitgateway.RouteTablePropagation` or `aws.ec2transitgateway.RouteTableAssociation` may result in lost connectivity due to unnecessary resource re-creation. To avoid this, use the `transitGatewayAttachmentId` attribute directly from the `aws.directconnect.GatewayAssociation` resource. For example, `transitGatewayAttachmentId = aws_dx_gateway_association.example.transit_gateway_attachment_id`. * * ## Example Usage * * ### By Transit Gateway and Direct Connect Gateway Identifiers * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2transitgateway.getDirectConnectGatewayAttachment({ * transitGatewayId: exampleAwsEc2TransitGateway.id, * dxGatewayId: exampleAwsDxGateway.id, * }); * ``` */ function getDirectConnectGatewayAttachment(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:ec2transitgateway/getDirectConnectGatewayAttachment:getDirectConnectGatewayAttachment", { "dxGatewayId": args.dxGatewayId, "filters": args.filters, "region": args.region, "tags": args.tags, "transitGatewayId": args.transitGatewayId, }, opts); } exports.getDirectConnectGatewayAttachment = getDirectConnectGatewayAttachment; /** * Get information on an EC2 Transit Gateway's attachment to a Direct Connect Gateway. * * !> **Warning:** Using the `aws.ec2transitgateway.getDirectConnectGatewayAttachment` data source in combination with `aws.ec2transitgateway.RouteTablePropagation` or `aws.ec2transitgateway.RouteTableAssociation` may result in lost connectivity due to unnecessary resource re-creation. To avoid this, use the `transitGatewayAttachmentId` attribute directly from the `aws.directconnect.GatewayAssociation` resource. For example, `transitGatewayAttachmentId = aws_dx_gateway_association.example.transit_gateway_attachment_id`. * * ## Example Usage * * ### By Transit Gateway and Direct Connect Gateway Identifiers * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2transitgateway.getDirectConnectGatewayAttachment({ * transitGatewayId: exampleAwsEc2TransitGateway.id, * dxGatewayId: exampleAwsDxGateway.id, * }); * ``` */ function getDirectConnectGatewayAttachmentOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:ec2transitgateway/getDirectConnectGatewayAttachment:getDirectConnectGatewayAttachment", { "dxGatewayId": args.dxGatewayId, "filters": args.filters, "region": args.region, "tags": args.tags, "transitGatewayId": args.transitGatewayId, }, opts); } exports.getDirectConnectGatewayAttachmentOutput = getDirectConnectGatewayAttachmentOutput; //# sourceMappingURL=getDirectConnectGatewayAttachment.js.map