By thejimbirch on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.3.x
Introduced in version:
11.3.0
Issue links:
Description:
In addition to config and value, recipe's input source element now accepts env. If source is env, there must also be an env element, which is the name of an environment variable to return.
The value will always be returned as a string. If the environment variable is not set, an empty string will be returned.
Example:
name: 'Input from environment variables'
input:
name:
data_type: string
description: The name of the site.
default:
# Set the source to look for an environment variable.
source: env
# Define the name of the environment variable.
env: SITE_NAME
slogan:
data_type: string
description: The site slogan.
default:
source: env
env: SITE_SLOGAN
config:
actions:
system.site:
# Use the input in the same way we always have.
simpleConfigUpdate:
name: ${name}
slogan: ${slogan}
Impacts:
Site builders, administrators, editors
Module developers
Themers
Site templates, recipes and distribution developers