Environment Variable Resolver
Published 31 O 2023
Environment Variable Resolver
This is available in Flyway CLI only
For parameters in the environment namespace it is possible to inject variables into the TOML using the environment variable resolver.
This expects an entry of the form ${env.VARIABLE_NAME}
.
Note: Flyway parameters outside of the environment namespace have their own configuration - see the 'Environment Variable' section of the parameter of interest
Example
Set your environment variable:
export DATABASE_USERNAME=sa
This can then be used in the TOML configuration like this:
...
[environments.mydevdb]
user = "${env.DATABASE_USERNAME}"
...