> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aviatrix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Attaching a Spoke to a Transit FireNet

> After adding a Transit FireNet, you can attach Spoke gateways. The GCP Spoke gateways can have Global VPC enabled.

After adding a
[Transit FireNet](https://legacy.docs.aviatrix.com/documentation/latest/security/transit-firenet-create.html),
you can attach Spoke gateways. The GCP Spoke gateways can have [Global
VPC](https://docs.aviatrix.com/docs/enterprise/10.0/concepts-architectures/architecture/connectivity/gcp-global-vpc.md) enabled.

## Managing Gateway Attachment

> [tab] CoPilot UI
>
> 1. Navigate to **Cloud Fabric > Gateways > Spoke Gateways**.
>
> 2. Click the **Manage Gateway Attachments** icon ![25](https://mintcdn.com/aviatrix-14b37c43/mOZ0lmP7pRPIryx3/images/guides/security/firenet/attach-icon.png?fit=max\&auto=format\&n=mOZ0lmP7pRPIryx3\&q=85\&s=8b1793f429a9222ce5b799247400f38b) next
>    to a Spoke Gateway.
>
> 3. In the Manage Gateway Attachments dialog, click **Attachment** on the Transit
>    Gateway tab to select the Transit Gateway to which the Spoke Gateway will be
>    attached.
>
> 4. Click **Save**.
>
> > [!NOTE]
> >
> > To detach a Spoke from a Transit FireNet, you can open the Manage Gateway
> > Attachment dialog, click the **Delete** icon ![25](https://mintcdn.com/aviatrix-14b37c43/mOZ0lmP7pRPIryx3/images/guides/security/firenet/trash-icon.png?fit=max\&auto=format\&n=mOZ0lmP7pRPIryx3\&q=85\&s=8c62659a84f8977dcf140a5be39fb850) next to
> > the Transit gateway in the list, and click **Save**.

> [tab] Terraform
>
> Attach a Spoke gateway to a Transit FireNet with the
> [aviatrix\_spoke\_transit\_attachment](https://registry.terraform.io/providers/AviatrixSystems/aviatrix/latest/docs/resources/aviatrix_spoke_transit_attachment)
> resource. Use this resource when the Spoke gateway's
> `manage_transit_gateway_attachment` attribute is set to `false`; otherwise,
> manage the attachment inline with the `transit_gw` attribute on
> [aviatrix\_spoke\_gateway](https://registry.terraform.io/providers/AviatrixSystems/aviatrix/latest/docs/resources/aviatrix_spoke_gateway).
>
> **1. Attach the Spoke gateway to the Transit FireNet**
>
> Add the following `aviatrix_spoke_transit_attachment` resource block to your Terraform configuration file:
>
> ```hcl theme={null}
> resource "aviatrix_spoke_transit_attachment" "spoke_to_firenet" {
>   spoke_gw_name   = "spoke-aws-use1"
>   transit_gw_name = "transit-firenet-aws-use1"
> }
> ```
>
> **2. Verify and Apply the Configuration**
>
> Run `terraform plan`, review the planned changes, and run `terraform apply`.

***

## Editing Transit Gateway Attachment for a Spoke Gateway

> [tab] CoPilot UI
>
> 1. Navigate to **Cloud Fabric > Gateways > Spoke Gateways**.
>
> 2. Click the **Edit** icon ![edit icon](https://mintcdn.com/aviatrix-14b37c43/mOZ0lmP7pRPIryx3/images/guides/security/firenet/edit-icon.png?fit=max\&auto=format\&n=mOZ0lmP7pRPIryx3\&q=85\&s=850942b0ccb8d08666d83c782763de02) next
>    to the Spoke gateway.
>
> 3. Select the FireNet-enabled Transit gateway from the **Attach Transit
>    Gateway** drop-down, or the Egress Transit FireNet from the **Attach to
>    Egress Transit FireNet** drop-down.
>
> 4. Click **Save**.
>
> > [!NOTE]
> >
> > You can detach a Spoke from a Transit FireNet by editing the Spoke gateway and
> > removing the Transit gateway from the **Attach Transit Gateway** drop-down.

> [tab] Terraform
>
> Change which Transit FireNet a Spoke gateway is attached to by updating the
> `transit_gw_name` argument and re-applying:
>
> **1. Update the attachment**
>
> Change `transit_gw_name` to the new Transit gateway, then add the following block to your Terraform configuration file (or update the existing block from the previous step):
>
> ```hcl theme={null}
> resource "aviatrix_spoke_transit_attachment" "spoke_to_firenet" {
>   spoke_gw_name   = "spoke-aws-use1"
>   transit_gw_name = "egress-transit-firenet-aws-use1"
> }
> ```
>
> **2. Verify and Apply the Configuration**
>
> Run `terraform plan`, review the planned changes, and run `terraform apply`. To detach the Spoke gateway entirely, remove the resource block and run `terraform apply` again.

***

## Related Resources

* [Aviatrix Terraform provider](https://registry.terraform.io/providers/AviatrixSystems/aviatrix/latest/docs)
* [aviatrix\_spoke\_transit\_attachment resource](https://registry.terraform.io/providers/AviatrixSystems/aviatrix/latest/docs/resources/aviatrix_spoke_transit_attachment)
* [aviatrix\_spoke\_gateway resource](https://registry.terraform.io/providers/AviatrixSystems/aviatrix/latest/docs/resources/aviatrix_spoke_gateway)
* [Transit FireNet Workflow for AWS](https://docs.aviatrix.com/docs/enterprise/10.0/guides/security/firenet/transit-firenet-workflow-aws.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.