# WithAdminDeploymentScriptStorage

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

Configures the Azure SQL Server to use the specified storage account for deployment script execution.

## Remarks

When an Azure SQL Server has a private endpoint, deployment scripts require a storage account to upload
scripts and write logs. This method allows you to provide an explicit storage account instead of having
one auto-created.
The storage account must have `AllowSharedKeyAccess` enabled, as deployment scripts need to mount
file shares. If the storage is not an existing resource, this method will automatically configure
`AllowSharedKeyAccess = true`.

## Definition

```go
func (AzureSqlServerResource) WithAdminDeploymentScriptStorage(storage AzureStorageResource) AzureSqlServerResource
```

## Parameters

- `storage` ([`AzureStorageResource`](/reference/api/go/aspire.hosting.azure.sql/azurestorageresource.md)) -- The storage account to use for deployment scripts.

## Returns

[`AzureSqlServerResource`](/reference/api/go/aspire.hosting.azure.sql/azuresqlserverresource.md) -- The resource builder.

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

## Applies to

- [`AzureSqlServerResource`](/reference/api/go/aspire.hosting.azure.sql/azuresqlserverresource.md)
