Federated Environments
Sharing state and enabling run triggers across environments
Overview
Federated environment access in Scalr enables users to create dependencies between workspaces across different environments. This functionality enables teams to set up run triggers, where the successful execution in one workspace automatically initiates runs in dependent workspaces in other environments. It also facilitates state sharing, where outputs from one workspace can be used as inputs in another. By granting controlled access between environments, federated environments streamline cross-environment workflows while maintaining appropriate security boundaries.
Key Capabilities
- Run Trigger Automation: Set up automated workflows that trigger runs in dependent workspaces in a different environment when a successful run occurs in an upstream workspace.
- State Sharing: Access and utilize output data from one workspace in another through the state sharing functionality.
Configuring Access
To enable federated environments, navigate to Environment Settings and select "Federated Environments." In this case, the environment that the state should be shared with should be chosen. This means that the environment added to the access list will also be able to add run triggers from the environment from which you are enabling the access.

Example
There are two workspaces in two environments: A and B. Workspaces in environment B depend on environment A. This requires configuring an upstream run trigger in the workspaces in environment B so that any run in environment A triggers a run in B. It is also necessary to pull outputs from the state as part of the dependency, which means access must be granted from the workspaces in A.
To do this with federated environments, go to settings in environment A and grant access to environment B.

Next, log into a workspace in environment B and add the upstream workspace from A:

Lastly, make sure that workspace A allows state access to B. Log into workspace A and grant that access:

Updated about 3 hours ago