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

# coreweave_inference_gateway (Resource)

> Terraform resource for creating and managing CoreWeave Managed Inference gateways

Create and manage [CoreWeave Managed Inference](/products/inference) gateways. See [gateways](/products/inference/gateways) for authentication and routing details.

## Example usage

```terraform theme={"system"}
resource "coreweave_inference_gateway" "example" {
  name  = "my-gateway"
  zones = ["US-EAST-04A"]

  auth = {
    coreweave = {}
  }

  routing = {
    body_based = {
      api_type = "API_TYPE_OPENAI"
    }
  }
}
```

## Schema

### Required

* `auth` (Attributes) The [authentication configuration](/products/inference/gateways) for the gateway. Exactly one of `coreweave` or `weights_and_biases` must be specified. (see [below for nested schema](#nestedatt--auth))
* `name` (String) The human-readable name of the gateway.
* `routing` (Attributes) The [routing configuration](/products/inference/gateways) for the gateway. Exactly one of `body_based`, `header_based`, or `path_based` must be specified. (see [below for nested schema](#nestedatt--routing))
* `zones` (Set of String) The zones to make the gateway available in. Limits where deployments associated with the gateway may exist.

### Optional

* `endpoint_configuration` (Attributes) Additional endpoint configuration options. (see [below for nested schema](#nestedatt--endpoint_configuration))

### Read-Only

* `conditions` (Attributes List) Detailed status conditions for the gateway. (see [below for nested schema](#nestedatt--conditions))
* `created_at` (String) RFC3339 timestamp of when the gateway was created.
* `endpoints` (Set of String) The endpoint URIs for the gateway.
* `id` (String) The unique identifier of the gateway.
* `organization_id` (String) The organization ID that owns the gateway.
* `status` (String) The current status of the gateway. See the [Inference API overview](/products/inference/reference/api-overview) for status values.
* `updated_at` (String) RFC3339 timestamp of when the gateway was last updated.

### Nested Schema for `auth`

Optional:

* `coreweave` (Attributes) Use CoreWeave IAM authentication. (see [below for nested schema](#nestedatt--auth--coreweave))
* `weights_and_biases` (Attributes) Use [Weights & Biases authentication](/products/inference/gateways#w\&b-authentication). (see [below for nested schema](#nestedatt--auth--weights_and_biases))

### Nested Schema for `auth.coreweave`

### Nested Schema for `auth.weights_and_biases`

Optional:

* `api_key` (String, Sensitive) The organization API key for Weights & Biases. Requires `server_url` to also be set.
* `enable_rate_limiting` (Boolean) Whether to enable Weights & Biases controlled rate limiting.
* `enable_usage_reports` (Boolean) Whether to send usage data to Weights & Biases.
* `server_url` (String) The Weights & Biases server URL. Defaults to the shared SaaS instance if not set.

### Nested Schema for `routing`

Optional:

* `body_based` (Attributes) Body-based routing configuration. Routes requests based on the request body content. (see [below for nested schema](#nestedatt--routing--body_based))
* `header_based` (Attributes) Header-based routing configuration. Routes requests using a header value to match the model by name. (see [below for nested schema](#nestedatt--routing--header_based))
* `path_based` (Attributes) Path-based routing configuration. Routes requests based on the URL path. (see [below for nested schema](#nestedatt--routing--path_based))

### Nested Schema for `routing.body_based`

Required:

* `api_type` (String) The well-known API type for routing. Must be one of: `API_TYPE_OPENAI`.

### Nested Schema for `routing.header_based`

Required:

* `header_name` (String) The name of the header to use for routing.

### Nested Schema for `routing.path_based`

### Nested Schema for `endpoint_configuration`

Optional:

* `additional_dns` (Set of String) Additional DNS names for the gateway endpoint. These DNS names must be manually configured to point to the gateway endpoint.

### Nested Schema for `conditions`

Read-Only:

* `last_update_time` (String) RFC3339 timestamp of the last condition transition.
* `message` (String) A human-readable message about the condition's last transition.
* `reason` (String) A short, machine-readable reason for the condition's last transition.
* `status` (String) The condition status (`True`, `False`, or `Unknown`).
* `type` (String) The condition type (e.g. `Ready`, `Progressing`).

## Import

Import is supported using the following syntax:

```bash theme={"system"}
terraform import coreweave_inference_gateway.example {{gateway-id}}
```
