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

# Configuring state access control

> Control which environments can access env zero remote state, restricting terraform_remote_state access to specific projects for secure state sharing.

## State Access Control

Terraform allows accessing states stored on remote backends using its built in [terraform\_remote\_state](https://developer.hashicorp.com/terraform/language/state/remote-state-data) data resource, env zero allows specifying which environments would be allowed to access an environment's state on env zero triggered deployments.

## Setting Your Environment State Access

To set your environment's state access, go to the Environment -> Settings tab and select which [projects](https://docs.envzero.com/guides/admin-guide/projects.md) are allowed to access the environment's state. You can choose to allow access to all environments in your organization or limit access to specific projects or their subprojects.

![Environment Settings page with state access controls listing project options for allowed access](https://mintcdn.com/envzero-b61043c8/pvGFjFxaiqGDTFG3/images/guides/admin-guide/remote-backend/5c9c358-image.png?fit=max\&auto=format\&n=pvGFjFxaiqGDTFG3\&q=85\&s=a439ded099f406140ce26173896fe063)

After saving these settings only environments in the selected projects or their subprojects will be allowed to fetch that environment's state.

> [!NOTE]
>
> **Note:**
>
> These settings will only affect deployments that are running inside env zero, for local runs or state access that is from outside env zero the logged-in [API key](https://docs.envzero.com/guides/admin-guide/user-role-and-team-management/api-keys.md) / User personal key permissions will determine if they can access the state or not.

## Next steps

* [Read the allowed state from another stack](https://docs.envzero.com/guides/admin-guide/remote-backend/remote-state-data-source.md) with `terraform_remote_state`
* [Share environment outputs instead](https://docs.envzero.com/guides/admin-guide/variables/environment-outputs.md), if consumers need specific values rather than the full state


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