Skip to content
Docs Try Aspire

withEnvironment

Function
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface ContainerResource {
// ... omitted for brevity
withEnvironment(
name: string,
value: string): IResourceWithEnvironment;
}

Signature

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

Applies to

This function is an extension method on the following types: