Service.AddConfig(ConfigReference) Method

Definition

Adds a configuration reference to the service's list of configurations. This method allows you to include external configuration resources that the service can utilize at runtime.

public Aspire.Hosting.Docker.Resources.ComposeNodes.Service AddConfig(Aspire.Hosting.Docker.Resources.ServiceNodes.ConfigReference config);
member this.AddConfig : Aspire.Hosting.Docker.Resources.ServiceNodes.ConfigReference -> Aspire.Hosting.Docker.Resources.ComposeNodes.Service
Public Function AddConfig (config As ConfigReference) As Service

Parameters

config
ConfigReference

The config reference to add

Returns

The updated Service instance with the added environmental variable.

Applies to