IComputeEnvironmentWithVolumeMounts
namespace Aspire.Hosting.ApplicationModel;
public interface IComputeEnvironmentWithVolumeMounts : Aspire.Hosting.ApplicationModel.IComputeEnvironmentResource, Aspire.Hosting.ApplicationModel.IResource{ // ...}Remarks
Section titled Remarks Binding a volume to an environment variable promises the workload that reading that variable yields a path backed by storage. Only a compute environment that consumes Container can keep that promise, so those environments declare the capability by implementing this interface.
When the target environment does not implement this interface, resolving the variable fails at publish time rather than emitting a path that resolves to ordinary writable container storage. Without the check the failure is silent and late: writes succeed, and the data disappears when the workload restarts or is rescheduled.