aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter
Explore with Pulumi AI
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
transit_gateway_id
argument in theaws.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 theaws.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
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});
import pulumi
import pulumi_aws as aws
example = aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter("example", transit_gateway_attachment_id=example_aws_networkfirewall_firewall["firewallStatus"][0]["transitGatewayAttachmentSyncState"][0]["attachmentId"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkfirewall"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkfirewall.NewFirewallTransitGatewayAttachmentAccepter(ctx, "example", &networkfirewall.FirewallTransitGatewayAttachmentAccepterArgs{
TransitGatewayAttachmentId: pulumi.Any(exampleAwsNetworkfirewallFirewall.FirewallStatus[0].TransitGatewayAttachmentSyncState[0].AttachmentId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.NetworkFirewall.FirewallTransitGatewayAttachmentAccepter("example", new()
{
TransitGatewayAttachmentId = exampleAwsNetworkfirewallFirewall.FirewallStatus[0].TransitGatewayAttachmentSyncState[0].AttachmentId,
});
});
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.List;
import java.util.ArrayList;
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());
}
}
resources:
example:
type: aws:networkfirewall:FirewallTransitGatewayAttachmentAccepter
properties:
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
Create FirewallTransitGatewayAttachmentAccepter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FirewallTransitGatewayAttachmentAccepter(name: string, args: FirewallTransitGatewayAttachmentAccepterArgs, opts?: CustomResourceOptions);
@overload
def FirewallTransitGatewayAttachmentAccepter(resource_name: str,
args: FirewallTransitGatewayAttachmentAccepterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FirewallTransitGatewayAttachmentAccepter(resource_name: str,
opts: Optional[ResourceOptions] = None,
transit_gateway_attachment_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[FirewallTransitGatewayAttachmentAccepterTimeoutsArgs] = None)
func NewFirewallTransitGatewayAttachmentAccepter(ctx *Context, name string, args FirewallTransitGatewayAttachmentAccepterArgs, opts ...ResourceOption) (*FirewallTransitGatewayAttachmentAccepter, error)
public FirewallTransitGatewayAttachmentAccepter(string name, FirewallTransitGatewayAttachmentAccepterArgs args, CustomResourceOptions? opts = null)
public FirewallTransitGatewayAttachmentAccepter(String name, FirewallTransitGatewayAttachmentAccepterArgs args)
public FirewallTransitGatewayAttachmentAccepter(String name, FirewallTransitGatewayAttachmentAccepterArgs args, CustomResourceOptions options)
type: aws:networkfirewall:FirewallTransitGatewayAttachmentAccepter
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FirewallTransitGatewayAttachmentAccepterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FirewallTransitGatewayAttachmentAccepterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FirewallTransitGatewayAttachmentAccepterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FirewallTransitGatewayAttachmentAccepterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FirewallTransitGatewayAttachmentAccepterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var firewallTransitGatewayAttachmentAccepterResource = new Aws.NetworkFirewall.FirewallTransitGatewayAttachmentAccepter("firewallTransitGatewayAttachmentAccepterResource", new()
{
TransitGatewayAttachmentId = "string",
Region = "string",
Timeouts = new Aws.NetworkFirewall.Inputs.FirewallTransitGatewayAttachmentAccepterTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := networkfirewall.NewFirewallTransitGatewayAttachmentAccepter(ctx, "firewallTransitGatewayAttachmentAccepterResource", &networkfirewall.FirewallTransitGatewayAttachmentAccepterArgs{
TransitGatewayAttachmentId: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &networkfirewall.FirewallTransitGatewayAttachmentAccepterTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var firewallTransitGatewayAttachmentAccepterResource = new FirewallTransitGatewayAttachmentAccepter("firewallTransitGatewayAttachmentAccepterResource", FirewallTransitGatewayAttachmentAccepterArgs.builder()
.transitGatewayAttachmentId("string")
.region("string")
.timeouts(FirewallTransitGatewayAttachmentAccepterTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
firewall_transit_gateway_attachment_accepter_resource = aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter("firewallTransitGatewayAttachmentAccepterResource",
transit_gateway_attachment_id="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
})
const firewallTransitGatewayAttachmentAccepterResource = new aws.networkfirewall.FirewallTransitGatewayAttachmentAccepter("firewallTransitGatewayAttachmentAccepterResource", {
transitGatewayAttachmentId: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: aws:networkfirewall:FirewallTransitGatewayAttachmentAccepter
properties:
region: string
timeouts:
create: string
delete: string
transitGatewayAttachmentId: string
FirewallTransitGatewayAttachmentAccepter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FirewallTransitGatewayAttachmentAccepter resource accepts the following input properties:
- Transit
Gateway stringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts
- Transit
Gateway stringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts Args
- transit
Gateway StringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts
- transit
Gateway stringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts
- transit_
gateway_ strattachment_ id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts Args
- transit
Gateway StringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the FirewallTransitGatewayAttachmentAccepter resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FirewallTransitGatewayAttachmentAccepter Resource
Get an existing FirewallTransitGatewayAttachmentAccepter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FirewallTransitGatewayAttachmentAccepterState, opts?: CustomResourceOptions): FirewallTransitGatewayAttachmentAccepter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
timeouts: Optional[FirewallTransitGatewayAttachmentAccepterTimeoutsArgs] = None,
transit_gateway_attachment_id: Optional[str] = None) -> FirewallTransitGatewayAttachmentAccepter
func GetFirewallTransitGatewayAttachmentAccepter(ctx *Context, name string, id IDInput, state *FirewallTransitGatewayAttachmentAccepterState, opts ...ResourceOption) (*FirewallTransitGatewayAttachmentAccepter, error)
public static FirewallTransitGatewayAttachmentAccepter Get(string name, Input<string> id, FirewallTransitGatewayAttachmentAccepterState? state, CustomResourceOptions? opts = null)
public static FirewallTransitGatewayAttachmentAccepter get(String name, Output<String> id, FirewallTransitGatewayAttachmentAccepterState state, CustomResourceOptions options)
resources: _: type: aws:networkfirewall:FirewallTransitGatewayAttachmentAccepter get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts - Transit
Gateway stringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts Args - Transit
Gateway stringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts - transit
Gateway StringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts - transit
Gateway stringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Firewall
Transit Gateway Attachment Accepter Timeouts Args - transit_
gateway_ strattachment_ id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts Property Map
- transit
Gateway StringAttachment Id - The unique identifier of the transit gateway attachment to accept. This ID is returned in the response when creating a transit gateway-attached firewall.
Supporting Types
FirewallTransitGatewayAttachmentAccepterTimeouts, FirewallTransitGatewayAttachmentAccepterTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Import
Using pulumi import
, import Network Firewall Firewall Transit Gateway Attachment Accepter using the transit_gateway_attachment_id
. For example:
$ pulumi import aws:networkfirewall/firewallTransitGatewayAttachmentAccepter:FirewallTransitGatewayAttachmentAccepter example tgw-attach-0c3b7e9570eee089c
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.