Where credentials are read
Turf™ runs in two processes, and each reads its own environment. Put a credential where the process that uses it can see it.
- Providers run in the engine. They read the engine’s environment, and of your shell’s or your agent’s only the variables you name for them. An engine the server started has a small fixed environment.
- Variables, the state backend and state encryption are handled by the MCP server. They read the
server’s environment and the values your agent passes to
openand each plan command. - Provider arguments in the configuration (
profile,assume_role,config_path) override the environment a provider would otherwise read.
A variable you export in a terminal reaches the server only when you start your agent, or the Turf
CLI, from that terminal. An engine the server started takes only Turf’s own settings from the
server’s environment, your MCP client’s env block included: TURF_*, DO_NOT_TRACK, CI,
TF_PLUGIN_CACHE_DIR and TF_CLI_CONFIG_FILE. Nothing else reaches the engine’s own environment,
and the Homebrew service reads none of it.
A variable a provider needs travels another way. Name it in TURF_PROVIDER_ENV, in the same env
block, and the server sends it with each run to the engine, however the engine was started: see
Send a variable to providers. Credentials in their usual
files, such as the default AWS profile and ~/.kube/config, need nothing set.
Three processes, three views
Section titled “Three processes, three views”A TF_VAR_ value reaches a provider only through a variable its block references. TF_ENCRYPTION
never leaves the server.
Who reads what
Section titled “Who reads what”| What | Read by | From |
|---|---|---|
| Providers (AWS, Azure, Google Cloud, Kubernetes®, …) | the engine | the engine’s own environment, then the variables the server sends by name (the provider environment), then the configuration directory’s mise environment, each over the one before |
| Variables, the state backend, state encryption | the MCP server | the tool calls (open’s values, kept for the workspace, under each plan command’s own) and the server’s environment, set in your MCP client’s env block; never mise |
Provider arguments in HCL (profile, assume_role, config_path) |
the configuration | override all three: the way to pin an account in the configuration itself; a secret there arrives through a variable, never a literal |
Where to set each one
Section titled “Where to set each one”- Send a variable to providers: an
AWS_PROFILEor aKUBECONFIGof yours, named in your agent’s entry for Turf. - The engine’s environment: an engine the server started,
the
turfservice andturf.env, an engine in a terminal or in a cluster. - Per-configuration environment with mise: an AWS profile, a kubeconfig path or a tool for one configuration only.
- Variables and TF_VAR_: values for
openand each plan command. - State backend, registries and mirrors: backend
credentials,
turf login, provider mirrors. - State encryption: the OpenTofu®
encryptionblock and its passphrase.
Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.
© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub