~> Deprecation Notice Equinix Metal will reach end of life on June 30, 2026. All Metal resources will be removed in version 5.0.0 of this provider. Use version 4.x of this provider for continued use through sunset. See https://docs.equinix.com/metal/ for more information.
equinix_metal_gateway (Resource)
Use this resource to create Metal Gateway resources in Equinix Metal.
See the Virtual Routing and Forwarding documentation for product details and API reference material.
Example Usage
# Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses
resource "equinix_metal_vlan" "test" {
description = "test VLAN in SV"
metro = "sv"
project_id = local.project_id
}
resource "equinix_metal_gateway" "test" {
project_id = local.project_id
vlan_id = equinix_metal_vlan.test.id
private_ipv4_subnet_size = 8
}
# Create Metal Gateway for a VLAN and reserved IP address block
resource "equinix_metal_vlan" "test" {
description = "test VLAN in SV"
metro = "sv"
project_id = local.project_id
}
resource "equinix_metal_reserved_ip_block" "test" {
project_id = local.project_id
metro = "sv"
quantity = 8
}
resource "equinix_metal_gateway" "test" {
project_id = local.project_id
vlan_id = equinix_metal_vlan.test.id
ip_reservation_id = equinix_metal_reserved_ip_block.test.id
}
Argument Reference
The following arguments are supported:
project_id- (Required) UUID of the project where the gateway is scoped to.vlan_id- (Required) UUID of the VLAN where the gateway is scoped to.ip_reservation_id- (Optional) UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts withprivate_ipv4_subnet_size.private_ipv4_subnet_size- (Optional) Size of the private IPv4 subnet to create for this metal gateway, must be one of8,16,32,64,128. Conflicts withip_reservation_id.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
state- Status of the gateway resource.vrf_id- UUID of the VRF associated with the IP Reservation
Timeouts
delete- (Default20m)