Assign and secure an environment
Share an environment with the people who need its configuration. Assign an appropriate role, then attach the environment to workflows that need its variables.
Before you start
Create the environment and its stage values first using Create environment variables. Identify both the workflow that needs the variables and the people who need to manage them. A workflow needing a value does not mean every team member needs permission to edit or reveal it.
You need permission to manage the environment and its access list.
Set environment permissions
Open Environments with the account whose access you need to understand.

Note which environments are visible before changing permissions.
As an administrator, open the environment's Permissions page and review Viewer, Editor, and Admin roles.

Choose the role required for the person's responsibilities.
Select the intended organization member, choose the role, and add the grant.

Confirm the saved member and role in the permissions table.
Have the member refresh Environments with their own account.

Confirm that the specifically shared environment is visible.
Open the environment with the Viewer account and inspect the available controls.

Review restrictions on creating variables, revealing secrets, editing, and deleting rather than relying only on the role name.
Use variables in a workflow
In the workflow, open More options → Environments and choose the required environment.

Its variables then become available to the workflow's reference picker.
Open the field that needs a variable and use the reference picker to select it under Environment Variables.

Insert a live reference rather than typing a similar-looking variable name as plain text.
Review the field after inserting the variable and remove any unused picker trigger.

Save the workflow with the intended instruction and reference intact.
Run the workflow and inspect the resolved value in its result where appropriate.

Confirm that it corresponds to the stage being used without exposing secrets in user-facing output.
Remove environment access
When access is no longer required, remove the intended permission entry as an administrator.

Check the member carefully before deleting the grant.
Have the affected member refresh the environment view.

Confirm the resulting access state, taking any other organization or group grants into account.
Important behavior
Environment roles control which management actions a member can perform. A Viewer cannot edit the environment.
Do not send a secret variable to a user-facing output. Verify it through the operation that needs it.
Last updated
Was this helpful?

