Class FirewallTransitGatewayAttachmentAccepter


  • public class FirewallTransitGatewayAttachmentAccepter
    extends com.pulumi.resources.CustomResource
    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
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter;
     import com.pulumi.aws.networkfirewall.FirewallTransitGatewayAttachmentAccepterArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new FirewallTransitGatewayAttachmentAccepter("example", FirewallTransitGatewayAttachmentAccepterArgs.builder()
                 .transitGatewayAttachmentId(exampleAwsNetworkfirewallFirewall.firewallStatus()[0].transitGatewayAttachmentSyncState()[0].attachmentId())
                 .build());
     
         }
     }
     
     
    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 `transitGatewayAttachmentId`. For example: ```sh $ pulumi import aws:networkfirewall/firewallTransitGatewayAttachmentAccepter:FirewallTransitGatewayAttachmentAccepter example tgw-attach-0c3b7e9570eee089c ```
    • Constructor Detail

      • FirewallTransitGatewayAttachmentAccepter

        public FirewallTransitGatewayAttachmentAccepter​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • FirewallTransitGatewayAttachmentAccepter

        public FirewallTransitGatewayAttachmentAccepter​(java.lang.String name,
                                                        FirewallTransitGatewayAttachmentAccepterArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • FirewallTransitGatewayAttachmentAccepter

        public FirewallTransitGatewayAttachmentAccepter​(java.lang.String name,
                                                        FirewallTransitGatewayAttachmentAccepterArgs args,
                                                        @Nullable
                                                        com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • transitGatewayAttachmentId

        public com.pulumi.core.Output<java.lang.String> transitGatewayAttachmentId()
        Returns:
        The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
      • get

        public static FirewallTransitGatewayAttachmentAccepter get​(java.lang.String name,
                                                                   com.pulumi.core.Output<java.lang.String> id,
                                                                   @Nullable
                                                                   FirewallTransitGatewayAttachmentAccepterState state,
                                                                   @Nullable
                                                                   com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.