# AddAzureInfrastructure

- Module: [Aspire.Hosting.Azure](/reference/api/go/aspire.hosting.azure.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Adds an Azure provisioning resource to the application model.

## Definition

```go
func (DistributedApplicationBuilder) AddAzureInfrastructure(
    name string,
    configureInfrastructure func(obj AzureResourceInfrastructure),
) AzureProvisioningResource
```

## Parameters

- `name` (`string`) -- The name of the resource being added.
- `configureInfrastructure` (`func(obj AzureResourceInfrastructure)`) -- A callback used to configure the infrastructure resource.

## Returns

[`AzureProvisioningResource`](/reference/api/go/aspire.hosting.azure/azureprovisioningresource.md) -- A resource builder for the `AzureProvisioningResource` that can be used for further configuration.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
