@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
109 lines • 5.58 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.VpcAttachmentAccepter = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages the accepter's side of an EC2 Transit Gateway VPC Attachment.
*
* When a cross-account (requester's AWS account differs from the accepter's AWS account) EC2 Transit Gateway VPC Attachment
* is created, an EC2 Transit Gateway VPC Attachment resource is automatically created in the accepter's account.
* The requester can use the `aws.ec2transitgateway.VpcAttachment` resource to manage its side of the connection
* and the accepter can use the `aws.ec2transitgateway.VpcAttachmentAccepter` resource to "adopt" its side of the
* connection into management.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ec2transitgateway.VpcAttachmentAccepter("example", {
* transitGatewayAttachmentId: exampleAwsEc2TransitGatewayVpcAttachment.id,
* tags: {
* Name: "Example cross-account attachment",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_ec2_transit_gateway_vpc_attachment_accepter` using the EC2 Transit Gateway Attachment identifier. For example:
*
* ```sh
* $ pulumi import aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter example tgw-attach-12345678
* ```
*/
class VpcAttachmentAccepter extends pulumi.CustomResource {
/**
* Get an existing VpcAttachmentAccepter 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 VpcAttachmentAccepter(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VpcAttachmentAccepter. 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'] === VpcAttachmentAccepter.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applianceModeSupport"] = state?.applianceModeSupport;
resourceInputs["dnsSupport"] = state?.dnsSupport;
resourceInputs["ipv6Support"] = state?.ipv6Support;
resourceInputs["region"] = state?.region;
resourceInputs["securityGroupReferencingSupport"] = state?.securityGroupReferencingSupport;
resourceInputs["subnetIds"] = state?.subnetIds;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["transitGatewayAttachmentId"] = state?.transitGatewayAttachmentId;
resourceInputs["transitGatewayDefaultRouteTableAssociation"] = state?.transitGatewayDefaultRouteTableAssociation;
resourceInputs["transitGatewayDefaultRouteTablePropagation"] = state?.transitGatewayDefaultRouteTablePropagation;
resourceInputs["transitGatewayId"] = state?.transitGatewayId;
resourceInputs["vpcId"] = state?.vpcId;
resourceInputs["vpcOwnerId"] = state?.vpcOwnerId;
}
else {
const args = argsOrState;
if (args?.transitGatewayAttachmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'transitGatewayAttachmentId'");
}
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["transitGatewayAttachmentId"] = args?.transitGatewayAttachmentId;
resourceInputs["transitGatewayDefaultRouteTableAssociation"] = args?.transitGatewayDefaultRouteTableAssociation;
resourceInputs["transitGatewayDefaultRouteTablePropagation"] = args?.transitGatewayDefaultRouteTablePropagation;
resourceInputs["applianceModeSupport"] = undefined /*out*/;
resourceInputs["dnsSupport"] = undefined /*out*/;
resourceInputs["ipv6Support"] = undefined /*out*/;
resourceInputs["securityGroupReferencingSupport"] = undefined /*out*/;
resourceInputs["subnetIds"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["transitGatewayId"] = undefined /*out*/;
resourceInputs["vpcId"] = undefined /*out*/;
resourceInputs["vpcOwnerId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcAttachmentAccepter.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcAttachmentAccepter = VpcAttachmentAccepter;
/** @internal */
VpcAttachmentAccepter.__pulumiType = 'aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter';
//# sourceMappingURL=vpcAttachmentAccepter.js.map