Share via


CertificateTrustConfigurationCallbackAnnotationContext.EnvironmentVariables Property

Definition

Gets the environment variables required to configure certificate trust for the resource. The dictionary key is the environment variable name; the value can be either a string or a path value provider such as CertificateBundlePath or CertificateDirectoriesPath. By default the environment will always include an entry for SSL_CERT_DIR and may include SSL_CERT_FILE if Override or System is configured.

public System.Collections.Generic.Dictionary<string,object> EnvironmentVariables { get; init; }
member this.EnvironmentVariables : System.Collections.Generic.Dictionary<string, obj> with get, set
Public Property EnvironmentVariables As Dictionary(Of String, Object)

Property Value

Remarks

builder.AddContainer("my-resource", "my-image:latest")
    .WithCertificateTrustConfigurationCallback(ctx =>
    {
        ctx.EnvironmentVariables["MY_CUSTOM_CERT_VAR"] = ctx.CertificateBundlePath;
        ctx.EnvironmentVariables["CERTS_DIR"] = ctx.CertificateDirectoriesPath;
        return Task.CompletedTask;
    });

Applies to