# AzureBicepResourceAnnotation Constructors

- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Type: [AzureBicepResourceAnnotation](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceannotation.md)
- Kind: `Constructors`
- Members: `1`

Used to annotate resources as being potentially deployable by the `Azure.AzureProvisioner`.

## AzureBicepResourceAnnotation(AzureBicepResource)

- Name: `Constructor(AzureBicepResource)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure/BicepResourceAnnotation.cs#L31)

Used to annotate resources as being potentially deployable by the `Azure.AzureProvisioner`.

```csharp
public class AzureBicepResourceAnnotation
{
    public AzureBicepResourceAnnotation(
        AzureBicepResource resource)
    {
        // ...
    }
}
```

## Parameters

- `resource` ([AzureBicepResource](/reference/api/csharp/aspire.hosting.azure/azurebicepresource.md))
  The [AzureBicepResource](/reference/api/csharp/aspire.hosting.azure/azurebicepresource.md) which should be used by the `Azure.AzureProvisioner`.

## Remarks

The `Azure.AzureProvisioner` is only capable of deploying resources that implement [IAzureResource](/reference/api/csharp/aspire.hosting.azure/iazureresource.md) and only has built-in deployment logic for resources that derive from [AzureBicepResource](/reference/api/csharp/aspire.hosting.azure/azurebicepresource.md). This annotation that can be added to any `ApplicationModel.IResource` will be detected by the `Azure.AzureProvisioner` and used to provision an Azure resource for an Aspire resource type that does not itself derive from [AzureBicepResource](/reference/api/csharp/aspire.hosting.azure/azurebicepresource.md).

For example, the following code adds a [https://learn.microsoft.com/dotnet/api/aspire.hosting.applicationmodel.sqlserverserverresource](https://learn.microsoft.com/dotnet/api/aspire.hosting.applicationmodel.sqlserverserverresource) resource to the application model. This type does not derive from [AzureBicepResource](/reference/api/csharp/aspire.hosting.azure/azurebicepresource.md) but can be annotated with [AzureBicepResourceAnnotation](/reference/api/csharp/aspire.hosting.azure/azurebicepresourceannotation.md) by using the AzureSqlExtensions.AsAzureSqlDatabase() extension method.

```csharp
var builder = DistributedApplication.CreateBuilder();
builder.AddAzureProvisioning();
var sql = builder.AddSqlServerServer("sql"); // This resource would not be deployable via Azure Provisioner.
sql.AsAzureSqlDatabase(); // ... but it now is because this adds the AzureBicepResourceAnnotation annotation.
```
