# AzureSqlServerResource.WithAdminDeploymentScriptStorage

- Module: [Aspire.Hosting.Azure.Sql](/reference/api/go/aspire.hosting.azure.sql.md)
- Defined on: [AzureSqlServerResource](/reference/api/go/aspire.hosting.azure.sql/azuresqlserverresource.md)
- Version: `17.0.0`
- Kind: `method`

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
type AzureSqlServerResource interface {
    // ... omitted for brevity
    WithAdminDeploymentScriptStorage(storage AzureStorageResource) AzureSqlServerResource
}
```

## Signature

```go
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()`.

## Defined on

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