> ## 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

> An HTTP, PostgreSQL, MySQL, or Redis destination governed by Forge Resource Policies.

# forge\_resource (Resource)

An HTTP, PostgreSQL, MySQL, or Redis destination governed by Forge Resource
Policies. Assign `gateway_id` before enabling direct access or automatic
routing; an unassigned Resource remains catalogued but is not routable.

## Schema

### Required

* `name` (String)
* `protocol` (String) `http`, `postgres`, `mysql`, or `redis`. HTTP with `upstream_tls = true` connects to HTTPS. PostgreSQL, MySQL, and Redis require encryption.
* `upstream_host` (String)
* `upstream_port` (Number)

### Optional

* `enabled` (Boolean) (default: `true`)
* `gateway_id` (String) Customer-deployed Resource Gateway that can reach this destination. Required for direct access and automatic routing.
* `transparent_routing` (Boolean) Automatically route matching managed-device traffic through Forge. (default: `false`)
* `upstream_ca_pem` (String) Public CA certificate PEM used to verify a destination with a private certificate. Valid only with `upstream_tls = true`; omit it to use system trust roots. Use `trimspace(file("private-ca.pem"))` for a local certificate file.
* `upstream_tls` (Boolean) Encrypt and verify the connection from Forge to the destination. PostgreSQL, MySQL, and Redis require it; HTTP uses HTTPS when enabled. (default: `true`)

### Read-Only

* `id` (String) The ID of this resource.
* `access_name` (String) Stable name clients use to select this Resource through its Resource Gateway.
* `management_mode` (String) Where this Resource is managed.
* `manager_id` (String) Terraform manager that owns this Resource.
* `manager_instance` (String) Terraform workspace that owns this Resource.


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