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

# forge_resource_gateway

> A customer-deployed Forge gateway that carries direct and automatic access to assigned Resources.

# forge\_resource\_gateway (Resource)

A customer-deployed Forge gateway that carries direct and automatic access to assigned Resources.

Assign a Gateway through each Resource's `gateway_id`. Resources without an
assignment can remain in the catalog, but Forge cannot route them directly or
automatically.

Version-pinned Docker Compose deployment files are created in Forge Console.
Their deployment credential is never returned to Terraform or stored in state.

## Example Usage

```hcl theme={"system"}
resource "forge_resource_gateway" "production" {
  name     = "Production access"
  hostname = "resources.example.com"
}

resource "forge_resource" "orders" {
  name          = "Orders API"
  protocol      = "http"
  upstream_host = "orders.service.internal"
  upstream_port = 443
  upstream_tls  = true
  gateway_id    = forge_resource_gateway.production.id
}
```

After deploying the Gateway from Forge Console, obtain a short-lived client
credential with `forge resources token 'Orders API'`. The command prints only
the token and does not persist it.

## Schema

### Required

* `hostname` (String) DNS hostname clients use to reach this Resource Gateway.
* `name` (String)

### Optional

* `enabled` (Boolean)

### Read-Only

* `id` (String) The ID of this resource.
* `management_mode` (String) Where this Resource Gateway is managed.
* `manager_id` (String) Terraform manager that owns this Resource Gateway.
* `manager_instance` (String) Terraform workspace that owns this Resource Gateway.


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