Overview of environment variables
Magento Enterprise Cloud Edition enables you to create variables in your environment that override configuration options. For example, we strongly recommend you immediately change your Magento Admin URI and administrative user’s password to prevent someone guessing your login and changing settings without your knowledge.
We support the following types of variables:
- Variables defined by Magento Enterprise Cloud Edition itself and that give you all the context you need about the environment (how to connect to your database, for example).
- Custom environment variables you define.
Environment variable names must use the characters
- only and can be up to 256 characters in length.
Platform variables that are expressed as base64-encoded JSON object can be up to 4KB in size.
Environment variables have an
Variables are hierarchical, which means that if a variable is not overridden, it is inherited from the parent environment and is indicated as
This enables you to define your development variables only once, and use them on all the child environments.
List the current environment variables
To list current environment variables:
- Log in to your project using the CLI.
List the projects:
List environments in the selected project:
magento-cloud environment:list -p <project id>
SSH to the environment:
magento-cloud environment:ssh -p <project id> -e <environment name>
After you’re connected, enter
Variables are base64-encoded JSON objects.
To decode the value of a variable, enter
echo $<variable name> | base64 --decode
echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 --decode