Skip to main content

ENV

Vasyl MartyniukLess than 1 minute

Syntax

${ENV.<environmentVariable>}

Definition

Get the value of the environment variable with PHP core function getenv as described in the official PHP documentationopen in new window.

The policy below restrict access to the backend if the APP_ENV environment variable contains a production string value.

{
    "Statement": [
        {
            "Effect": "deny",
            "Resource": "Capability:aam_access_dashboard",
            "Condition": {
                "Equals": {
                    "${ENV.APP_ENV}": "production"
                }
            }
        }
    ]
}