Configuration
Defang allows you to configure your application using environment variables. You can set environment variables in your compose.yaml
file, or in your Pulumi program.
Sensitive Config Values
The Defang CLI allows you to securely store sensitive information such as API keys, passwords, and other credentials. To do so, run:
# Set a configuration value called API_KEY
defang config set API_KEY
You can use sensitive config by specifying them in the environment
section of a service in a compose.yaml
file without any value, or by specifying an environment key with a null
value in your Pulumi code.
Either one of list notation or map notation is acceptable for defining your environment variable(s). See below for an example of each.