UNPKG

@pulumi/aws

Version:

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

106 lines 4.76 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.ConnectPeer = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an EC2 Transit Gateway Connect Peer. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2transitgateway.Connect("example", { * transportAttachmentId: exampleAwsEc2TransitGatewayVpcAttachment.id, * transitGatewayId: exampleAwsEc2TransitGateway.id, * }); * const exampleConnectPeer = new aws.ec2transitgateway.ConnectPeer("example", { * peerAddress: "10.1.2.3", * insideCidrBlocks: ["169.254.100.0/29"], * transitGatewayAttachmentId: example.id, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_ec2_transit_gateway_connect_peer` using the EC2 Transit Gateway Connect Peer identifier. For example: * * ```sh * $ pulumi import aws:ec2transitgateway/connectPeer:ConnectPeer example tgw-connect-peer-12345678 * ``` */ class ConnectPeer extends pulumi.CustomResource { /** * Get an existing ConnectPeer resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ConnectPeer(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ConnectPeer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ConnectPeer.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["bgpAsn"] = state?.bgpAsn; resourceInputs["bgpPeerAddress"] = state?.bgpPeerAddress; resourceInputs["bgpTransitGatewayAddresses"] = state?.bgpTransitGatewayAddresses; resourceInputs["insideCidrBlocks"] = state?.insideCidrBlocks; resourceInputs["peerAddress"] = state?.peerAddress; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["transitGatewayAddress"] = state?.transitGatewayAddress; resourceInputs["transitGatewayAttachmentId"] = state?.transitGatewayAttachmentId; } else { const args = argsOrState; if (args?.insideCidrBlocks === undefined && !opts.urn) { throw new Error("Missing required property 'insideCidrBlocks'"); } if (args?.peerAddress === undefined && !opts.urn) { throw new Error("Missing required property 'peerAddress'"); } if (args?.transitGatewayAttachmentId === undefined && !opts.urn) { throw new Error("Missing required property 'transitGatewayAttachmentId'"); } resourceInputs["bgpAsn"] = args?.bgpAsn; resourceInputs["insideCidrBlocks"] = args?.insideCidrBlocks; resourceInputs["peerAddress"] = args?.peerAddress; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["transitGatewayAddress"] = args?.transitGatewayAddress; resourceInputs["transitGatewayAttachmentId"] = args?.transitGatewayAttachmentId; resourceInputs["arn"] = undefined /*out*/; resourceInputs["bgpPeerAddress"] = undefined /*out*/; resourceInputs["bgpTransitGatewayAddresses"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ConnectPeer.__pulumiType, name, resourceInputs, opts); } } exports.ConnectPeer = ConnectPeer; /** @internal */ ConnectPeer.__pulumiType = 'aws:ec2transitgateway/connectPeer:ConnectPeer'; //# sourceMappingURL=connectPeer.js.map