Share via


AzureBicepResourceExtensions.WithEnvironment Method

Definition

Overloads

WithEnvironment<T>(IResourceBuilder<T>, String, BicepOutputReference)

Adds an environment variable to the resource with the value of the output from the bicep template.

WithEnvironment<T>(IResourceBuilder<T>, String, BicepSecretOutputReference)

Adds an environment variable to the resource with the value of the secret output from the bicep template.

WithEnvironment<T>(IResourceBuilder<T>, String, BicepOutputReference)

Source:
AzureBicepResourceExtensions.cs
Source:
AzureBicepResourceExtensions.cs

Adds an environment variable to the resource with the value of the output from the bicep template.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithEnvironment<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string name, Aspire.Hosting.Azure.BicepOutputReference bicepOutputReference) where T : Aspire.Hosting.ApplicationModel.IResourceWithEnvironment;
static member WithEnvironment : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)> * string * Aspire.Hosting.Azure.BicepOutputReference -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)
<Extension()>
Public Function WithEnvironment(Of T As IResourceWithEnvironment) (builder As IResourceBuilder(Of T), name As String, bicepOutputReference As BicepOutputReference) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The resource builder.

name
String

The name of the environment variable.

bicepOutputReference
BicepOutputReference

The reference to the bicep output.

Returns

An IResourceBuilder<T>.

Applies to

WithEnvironment<T>(IResourceBuilder<T>, String, BicepSecretOutputReference)

Source:
AzureBicepResourceExtensions.cs
Source:
AzureBicepResourceExtensions.cs

Adds an environment variable to the resource with the value of the secret output from the bicep template.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithEnvironment<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string name, Aspire.Hosting.Azure.BicepSecretOutputReference bicepOutputReference) where T : Aspire.Hosting.ApplicationModel.IResourceWithEnvironment;
static member WithEnvironment : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)> * string * Aspire.Hosting.Azure.BicepSecretOutputReference -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)
<Extension()>
Public Function WithEnvironment(Of T As IResourceWithEnvironment) (builder As IResourceBuilder(Of T), name As String, bicepOutputReference As BicepSecretOutputReference) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The resource builder.

name
String

The name of the environment variable.

bicepOutputReference
BicepSecretOutputReference

The reference to the bicep output.

Returns

An IResourceBuilder<T>.

Applies to