withEnvironmentCallback

Method
📦 Aspire.Hosting v17.0.0
interface ContainerResource {
// ... omitted for brevity
withEnvironmentCallback(callback: callback): IResourceWithEnvironment;
}

Signature

methodwithEnvironmentCallbackbuilder
Allows for the population of environment variables on a resource.
withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise<void>): IResourceWithEnvironment
callback(arg: EnvironmentCallbackContext) => Promise<void>A callback that allows for deferred execution for computing many environment variables. This runs after resources have been allocated by the orchestrator and allows access to other resources to resolve computed data, e.g. connection strings, ports.
IResourceWithEnvironment

Applies to

This method applies to the following types: