UNPKG

@pulumi/aws

Version:

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

85 lines 5.2 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.FirewallTransitGatewayAttachmentAccepter = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an AWS Network Firewall Firewall Transit Gateway Attachment Accepter. * * When a cross-account (requester's AWS account differs from the accepter's AWS account) requester creates a Network Firewall with Transit Gateway ID using `aws.networkfirewall.Firewall`. Then an EC2 Transit Gateway VPC Attachment resource is automatically created in the accepter's account. * The accepter can use the `aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter` resource to "adopt" its side of the connection into management. * * > **NOTE:** If the `transitGatewayId` argument in the `aws.networkfirewall.Firewall` resource is used to attach a firewall to a transit gateway in a cross-account setup (where **Auto accept shared attachments** is disabled), the resource will be considered created when the transit gateway attachment is in the *Pending Acceptance* state and the firewall is in the *Provisioning* status. At this point, you can use the `aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter` resource to finalize the network firewall deployment. Once the transit gateway attachment reaches the *Available* state, the firewall status *Ready*. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter("example", {transitGatewayAttachmentId: exampleAwsNetworkfirewallFirewall.firewallStatus[0].transitGatewayAttachmentSyncState[0].attachmentId}); * ``` * * A full example of how to create a Transit Gateway in one AWS account, share it with a second AWS account, and create Network Firewall in the second account to the Transit Gateway via the `aws.networkfirewall.Firewall` and `aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter` resources can be found in the `./examples/network-firewall-cross-account-transit-gateway` directory within the Github Repository * * ## Import * * Using `pulumi import`, import Network Firewall Firewall Transit Gateway Attachment Accepter using the `transit_gateway_attachment_id`. For example: * * ```sh * $ pulumi import aws:networkfirewall/firewallTransitGatewayAttachmentAccepter:FirewallTransitGatewayAttachmentAccepter example tgw-attach-0c3b7e9570eee089c * ``` */ class FirewallTransitGatewayAttachmentAccepter extends pulumi.CustomResource { /** * Get an existing FirewallTransitGatewayAttachmentAccepter 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 FirewallTransitGatewayAttachmentAccepter(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of FirewallTransitGatewayAttachmentAccepter. 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'] === FirewallTransitGatewayAttachmentAccepter.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["region"] = state?.region; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["transitGatewayAttachmentId"] = state?.transitGatewayAttachmentId; } else { const args = argsOrState; if (args?.transitGatewayAttachmentId === undefined && !opts.urn) { throw new Error("Missing required property 'transitGatewayAttachmentId'"); } resourceInputs["region"] = args?.region; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["transitGatewayAttachmentId"] = args?.transitGatewayAttachmentId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FirewallTransitGatewayAttachmentAccepter.__pulumiType, name, resourceInputs, opts); } } exports.FirewallTransitGatewayAttachmentAccepter = FirewallTransitGatewayAttachmentAccepter; /** @internal */ FirewallTransitGatewayAttachmentAccepter.__pulumiType = 'aws:networkfirewall/firewallTransitGatewayAttachmentAccepter:FirewallTransitGatewayAttachmentAccepter'; //# sourceMappingURL=firewallTransitGatewayAttachmentAccepter.js.map