Skip to main content

Deployment Environment 🆕

The Deployment Environment lets you connect your workflows to cloud platforms and manage environment variables.

Key Features:​

  1. Cloud Connector: Link to a pre-configured cloud platform (e.g., AWS, Azure) or set up a new connection.
  2. Environment Variables: Define and expose variables to the runtime environment.
  3. 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 NameDescription
SG_VCS_AUTH_CREDSVCS authentication credentials.
SG_ORG_IDOrganization identifier in StackGuardian.
SG_WORKFLOW_GROUP_IDWorkflow group identifier within StackGuardian.
SG_WORKFLOW_IDIdentifier for the current StackGuardian workflow.
SG_WORKFLOW_RUN_IDCurrent workflow run identifier.
SG_STACK_IDStack identifier within the workflow.
SG_WORKFLOW_STEP_TEMPLATE_IDWorkflow step template identifier.
SG_EXECUTOR_USERUsername executing the workflow.
SG_MOUNTED_IAC_SOURCE_CODE_DIRMounted IAC source code directory path.
SG_VCS_WORKING_DIRECTORYVCS repository working directory.
SG_VCS_REPO_URLVCS repository URL.
SG_VCS_REPO_NAMEName of the VCS repository.
SG_VCS_REPO_REFVCS repository reference (branch, tag, commit).
SG_MOUNTED_WORKSPACE_ROOT_DIRMounted workspace root directory path.
SG_MOUNTED_ARTIFACTS_DIRMounted artifacts directory path.
SG_BASE64_POLICIESBase64-encoded policy objects associated with the workflow step.
SG_BASE64_WORKFLOW_STEP_INPUT_VARIABLESBase64-encoded workflow step input variables.
SG_BASE64_IAC_INPUT_VARIABLESBase64-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:

  1. Navigate to Orchestrator > Workflows Group > select the workflow where environment variables need to be referenced.
  2. Inside the workflow, go to Settings and select Deployment Environment.
  3. Click on "+ Create Environment Variable". Assign a Key that suits your use case, for example, DATABASE_PASSWORD.
  4. Instead of entering a value directly, access it From Vault. Select the appropriate secret from the dropdown menu.
  5. Click on Save to finalize the configuration.