Deployment Environment 🆕
The Deployment Environment lets you connect your workflows to cloud platforms and manage environment variables.
Key Features:​
- Cloud Connector: Link to a pre-configured cloud platform (e.g., AWS, Azure) or set up a new connection.
- Environment Variables: Define and expose variables to the runtime environment.
- Vault Integration: Securely store and use sensitive data from a vault.
StackGuardian Environment Variables​
This list details the environment variables specific to StackGuardian, necessary for setting up and executing tasks.
Variable Name | Description |
---|---|
SG_VCS_AUTH_CREDS | VCS authentication credentials. |
SG_ORG_ID | Organization identifier in StackGuardian. |
SG_WORKFLOW_GROUP_ID | Workflow group identifier within StackGuardian. |
SG_WORKFLOW_ID | Identifier for the current StackGuardian workflow. |
SG_WORKFLOW_RUN_ID | Current workflow run identifier. |
SG_STACK_ID | Stack identifier within the workflow. |
SG_WORKFLOW_STEP_TEMPLATE_ID | Workflow step template identifier. |
SG_EXECUTOR_USER | Username executing the workflow. |
SG_MOUNTED_IAC_SOURCE_CODE_DIR | Mounted IAC source code directory path. |
SG_VCS_WORKING_DIRECTORY | VCS repository working directory. |
SG_VCS_REPO_URL | VCS repository URL. |
SG_VCS_REPO_NAME | Name of the VCS repository. |
SG_VCS_REPO_REF | VCS repository reference (branch, tag, commit). |
SG_MOUNTED_WORKSPACE_ROOT_DIR | Mounted workspace root directory path. |
SG_MOUNTED_ARTIFACTS_DIR | Mounted artifacts directory path. |
SG_BASE64_POLICIES | Base64-encoded policy objects associated with the workflow step. |
SG_BASE64_WORKFLOW_STEP_INPUT_VARIABLES | Base64-encoded workflow step input variables. |
SG_BASE64_IAC_INPUT_VARIABLES | Base64-encoded IaC input variables. |
Referencing Secrets in Environment Variables​
This secure approach ensures that sensitive data, such as API keys, database credentials, and service endpoints, remain protected while enabling flexible configuration across various environments. By employing secrets management, DevOps teams can enhance security and efficiency, eliminating the need to hardcode sensitive information in the source code.
To reference secrets stored in vaults for use as environment variables in your workflows, follow these steps:
- Navigate to Orchestrator > Workflows Group > select the workflow where environment variables need to be referenced.
- Inside the workflow, go to Settings and select Deployment Environment.
- Click on "+ Create Environment Variable". Assign a Key that suits your use case, for example,
DATABASE_PASSWORD
. - Instead of entering a value directly, access it From Vault. Select the appropriate secret from the dropdown menu.
- Click on Save to finalize the configuration.