Skip to content
Docs Try Aspire
Docs Try

withEnvironment

Method
📦 Aspire.Hosting v13.4.0
interface ContainerResource {
// ... omitted for brevity
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment;
}

Signature

method withEnvironment builder
Sets an environment variable
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment
name string
value IExpressionValue
IResourceWithEnvironment

Applies to

This method applies to the following types: