forge_llm_gateway_access_profile manages the same durable access profile and
route plan used by the Forge console and LLM Gateway runtime. One apply sends
the profile and every declared route as a single route-plan update.
The resource does not manage provider credentials, gateway keys, or budgets.
Routes reference an existing Forge provider by exact display name. After apply,
create a gateway key in Forge Console → Gateway → Gateway keys and
select this access profile. The key—not the profile—assigns a caller identity
and profile at runtime. See Gateway keys.
Profile schema
Terraform plans are validated by Forge and bound to the exact profile version,
route plan, Terraform manager, and service-account principal. Apply presents
the short-lived signed token created by that exact plan; if it expires or the
profile changes, create a new plan.
Optional
web_search enables governed web search. In the Console, an administrator enters a Tavily API key and Forge saves it securely. Terraform accepts the reference to an existing Forge-managed Tavily secret as credential_secret_ref; it does not accept the plaintext key.
Route schema
Declare one or moreroute blocks when the profile owns routing. If present,
the list must contain at least one route.
Routes with the same priority form one tier and use the same strategy. Forge
uses eligible destinations in that tier before moving to the next priority.
Fallback is expressed with a later tier, not a
fallback strategy value.
Supported api_surface values:
config_json cannot contain credential or endpoint keys such as api_key,
authorization, token, client_secret, api_base, or base_url.
Configure those through the provider credential lifecycle in Forge.
Fixed route
Fallback plan
Routes in one resource are updated atomically:Import
Import by the stable profile ID:terraform plan and copy the exact remote route plan into HCL
before applying. Route order is meaningful because the resource uses a list.
Do not approve a plan that removes routes merely because they were omitted from
the imported configuration.
Request profile selection
Setrouting_key on forge_llm_gateway_access_profile to choose an immutable,
organization-unique header value. Assign several profiles to the same user,
group or service account with separate forge_llm_gateway_managed_access_override
resources. Set hosted_default = true on the preferred hosted assignment.
All assignments for one target share its aggregate budget, even when requests
switch profiles.
Issue keys through the Console or gateway token API. Ordinary keys use their
explicit profile ceiling. Principal-bound hosted capabilities also require
current managed assignments; attribution headers never enlarge authority.
Clients send X-Forge-Gateway-Profile with the routing key or canonical profile
ID. See LLM Gateway for SDK
examples and default selection behavior.