Visibility
You can limit the visibility of a variable during build or runtime using the --visible-<build|runtime>
command. Also, there are options to set inheritance and sensitivity.
Use the following options to prevent a variable from being seen or inherited:
--inheritable false
—disables inheritance for child environments. This is useful for setting production-only values on themaster
branch and allowing all other environments to use a project-level variable of the same name.--sensitive true
—marks the variable as non-readable in the Cloud Console. You cannot view the variable in the user interface; however, you can view the variable from the application container, like any other variable.
The following demonstrates a specific case for preventing a variable from being seen or inherited. You can only specify these options in the CLI. This case does not pertain to all available environment variables.
magento-cloud variable:create --name <variable-name> --value <variable-value> --inheritable false --sensitive true
Verify variable levels and values
You can view a list of existing variables using the Cloud CLI.
magento-cloud variables
Variables on the project Project-Name (<project-id>), environment <environment-name>:
+----------------------------+-------------+-------------------------------------------+
| Name | Level | Value |
+----------------------------+-------------+-------------------------------------------+
| env:COMPOSER_AUTH | project | { |
| | | "http-basic": { |
| | | "repo.magento.com": { |
| | | "username": |
| | | "<public-key>", |
| | | "password": |
| | | "<private-key>" |
| | | } |
| | | } |
| | | } |
| ADMIN_EMAIL | project | admin@123.com |
| ADMIN_EMAIL | environment | admin@123.com |
| ADMIN_PASSWORD | environment | password |
| ADMIN_URL | environment | admin123 |
| ADMIN_USERNAME | environment | admin |
| php:newrelic.license | environment | xxxx71fb030366182117f955a22e4baf8exxxxxx |
+----------------------------+-------------+-------------------------------------------+
Previous pageConfigure environment deployment
Next pageEnvironment variables