Azure Bicep Deploy Error - The 'parameters.properties.storageAccountSubscriptionId' segment in the url is invalid.
Issue context
When setting up Azure SQL database with auditing using Azure Blob Storage, you may encounter the following error:
The 'parameters.properties.storageAccountSubscriptionId' segment in the url is invalid.
The bicep resource code looks something like the following:
resource auditSettings 'Microsoft.Sql/servers/auditingSettings@2022-05-01-preview' = { parent: kontextSqlServer name: 'default' properties: { auditActionsAndGroups: [ 'SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP' 'FAILED_DATABASE_AUTHENTICATION_GROUP' 'BATCH_COMPLETED_GROUP' ] isAzureMonitorTargetEnabled: false isDevopsAuditEnabled: false isManagedIdentityInUse: false isStorageSecondaryKeyInUse: false retentionDays: 0 state: 'Enabled' storageAccountSubscriptionId: subscription_id storageEndpoint: sql_audit_blob_endpoint } }
subcription_id
and sql_audit_blob_endpoint
are parameters of string type.
Fix the issue
After spending some time to debug this issue, I found the error occurred because the parameter for subscription_id
is null or empty. After I ensure it is passed into the template correctly, the issue is resolved automatically.
storageAccountSubscriptionId: subscription_id storageEndpoint: sql_audit_blob_endpoint
References
This error is different from the following one:
info Last modified by Kontext 10 months ago
copyright
This page is subject to Site terms.
comment Comments
No comments yet.
Log in with external accounts
warning Please login first to view stats information.
code
Deploy Azure Function App with .NET 8 to Azure Container Apps via Bicep
article
Azure Bicep - Allow Azure services and resources to access this resource
article
Github Action Az Automation PowerShell: Object reference not set to an instance of an object
code
Deploy Azure Automation Runbooks via GitHub Actions
code
Use Bicep to deploy Azure Container Apps with a free managed certificate
Read more (7)