# AzureBicepResourceExtensions

- Kind: `class`
- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure/AzureBicepResourceExtensions.cs)

Extension methods for adding Azure Bicep resources to the application model.

## Definition

```csharp
namespace Aspire.Hosting;

public static class AzureBicepResourceExtensions
{
    // ...
}
```

## Methods

- [AddBicepTemplate(IDistributedApplicationBuilder, string, string)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#addbiceptemplate-idistributedapplicationbuilder-string-string) : `IResourceBuilder<AzureBicepResource>` `extension` `ats export` -- Adds an Azure Bicep resource to the application model.
- [AddBicepTemplateString(IDistributedApplicationBuilder, string, string)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#addbiceptemplatestring-idistributedapplicationbuilder-string-string) : `IResourceBuilder<AzureBicepResource>` `extension` `ats export` -- Adds an Azure Bicep resource to the application model.
- [GetOutput(IResourceBuilder<AzureBicepResource>, string)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#getoutput-iresourcebuilder-azurebicepresource-string) : [BicepOutputReference](/reference/api/csharp/aspire.hosting.azure/bicepoutputreference.md) `extension` `ats export` -- Gets a reference to an output from a bicep template.
- [GetSecretOutput(IResourceBuilder<AzureBicepResource>, string)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#getsecretoutput-iresourcebuilder-azurebicepresource-string) : [BicepSecretOutputReference](/reference/api/csharp/aspire.hosting.azure/bicepsecretoutputreference.md) `extension` `obsolete` -- Gets a reference to a secret output from a bicep template. This is an output that is written to a keyvault using the "keyVaultName" convention.
- [WithEnvironment(IResourceBuilder<T>, string, BicepOutputReference)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withenvironment-iresourcebuilder-t-string-bicepoutputreference) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds an environment variable to the resource with the value of the output from the bicep template.
- [WithEnvironment(IResourceBuilder<T>, string, BicepSecretOutputReference)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withenvironment-iresourcebuilder-t-string-bicepsecretoutputreference) : `IResourceBuilder<T>` `extension` `obsolete` -- Adds an environment variable to the resource with the value of the secret output from the bicep template.
- [WithEnvironment(IResourceBuilder<T>, string, IAzureKeyVaultSecretReference)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withenvironment-iresourcebuilder-t-string-iazurekeyvaultsecretreference) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds an environment variable to the resource with the value of the key vault secret.
- [WithParameter(IResourceBuilder<T>, string)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, string)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-string) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, IEnumerable<string>)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-ienumerable-string) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, JsonNode)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-jsonnode) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, Func<object?>)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-func-object) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, IResourceBuilder<ParameterResource>)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-iresourcebuilder-parameterresource) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, ParameterResource)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-parameterresource) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, IResourceBuilder<IResourceWithConnectionString>)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-iresourcebuilder-iresourcewithconnectionstring) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, BicepOutputReference)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-bicepoutputreference) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, ReferenceExpression)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-referenceexpression) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
- [WithParameter(IResourceBuilder<T>, string, EndpointReference)](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceextensions/methods.md#withparameter-iresourcebuilder-t-string-endpointreference) : `IResourceBuilder<T>` `extension` `ats ignored` -- Adds a parameter to the bicep template.
