Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddAzureInfrastructure

Method
📦 Aspire.Hosting.Azure v17.0.0
func (DistributedApplicationBuilder) AddAzureInfrastructure(
name string,
configureInfrastructure func(obj AzureResourceInfrastructure),
) AzureProvisioningResource

Signature

methodAddAzureInfrastructurebuilder
Adds an Azure provisioning resource to the application model.
AddAzureInfrastructure(
name string,
configureInfrastructure func(obj AzureResourceInfrastructure),
) AzureProvisioningResource
namestringThe name of the resource being added.
configureInfrastructurefunc(obj AzureResourceInfrastructure)callbackA callback used to configure the infrastructure resource.
AzureProvisioningResource

A resource builder for the AzureProvisioningResource that can be used for further configuration.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder