Definition
A process-level name and value used to pass configuration, endpoints, and connection information to an application.
- Also known as
- environment configuration, env var
Aspire supplies environment variables to running resources for configuration such as:
ConnectionStrings__resourcenamefor a named connection string.services__servicename__https__0for a service’s HTTPS endpoint.- Custom settings configured with
WithEnvironmentin C# orwithEnvironmentin TypeScript.
Applications read these through their runtime’s environment APIs or a configuration library. .NET configuration maps double underscores to configuration separators; JavaScript and Python can read the original environment variable names directly.
Values can contain secrets. Avoid copying sensitive environment values into bug reports or sharing them publicly.
Practical example
Inspect a service's environment in the dashboard to see which connection strings and endpoint settings the AppHost supplied.