Internal server error when deploying ARM Template
up vote
0
down vote
favorite
I am deploying an arm template that contains the following resources
Microsoft.Storage/storageAccount
Microsoft.Sql/servers
Microsoft.Sql/servers/auditPolicies
Now everything worked until I started changing the values for the auditPolicies
object. Here are the steps I took until the InternalServerError
occurred.
- Added the
auditState
property and set its value toDisabled
. Deployment Successful. - Changed the
auditState
property toEnabled
. Deployment failed. Error states that thestorageAccountName
is required. - Added
storageAccountName
and set its value to the name of the storage account. Deployment failed. Error states thatstorageAccountKey
. - Added
storageAccountKey
and set its value tokey1
of the storage account'skeys
object. Deployment failed. Internal Server Error - "An Error has occurred while saving Auditing settings, please try again later". Additionally, the errors cause the deployment to run indefinitely. Though I am not concerned about that aspect.
The following is the complete template.
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters":
"app-name-prefix":
"type": "string",
"minLength": 1
,
"app-locations":
"type": "array",
"minLength": 1
,
"app-friendly-names":
"type": "array",
"minLength": 1
,
"db-user-admin-username":
"type": "securestring"
,
"db-user-admin-password":
"type": "securestring"
,
"database-audit-enabled":
"defaultValue": "Enabled",
"allowedValues": [
"Enabled",
"Disabled"
],
"type": "string"
,
"storage-kind":
"defaultValue": "BlobStorage",
"allowedValues": [
"StorageV2",
"BlobStorage"
],
"type": "string"
,
"storage-sku":
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
],
"type": "string"
,
"variables":
"db-service-name": "[concat(parameters('app-name-prefix'), '-database-service-')]",
"storage-name": "[concat(toLower(parameters('app-name-prefix')), 'auditstorage')]"
,
"resources": [
"name": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"type": "Microsoft.Storage/storageAccounts",
"sku":
"name": "[parameters('storage-sku')]"
,
"kind": "[parameters('storage-kind')]",
"apiVersion": "2018-02-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"count": "[length(parameters('app-locations'))]",
"name": "storageCopy"
,
"properties":
"supportsHttpsTrafficOnly": true,
"accessTier": "Hot",
"encryption":
"services":
"blob":
"enabled": true
,
"file":
"enabled": true
,
"keySource": "Microsoft.Storage"
,
"type": "Microsoft.Sql/servers",
"name": "[concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()])]",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"name": "databaseServiceCopy",
"count": "[length(parameters('app-locations'))]"
,
"properties":
"administratorLogin": "[parameters('db-user-admin-username')]",
"administratorLoginPassword": "[parameters('db-user-admin-password')]",
"version": "12.0"
,
"resources": [
"type": "auditingPolicies",
"name": "Default",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"properties":
"auditingState": "[parameters('database-audit-enabled')]",
"storageAccountName": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"storageAccountKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]"
,
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
]
]
]
What am I missing that will help resolve this issue? What do I need to do to stop this internal server error?
I have added the complete template as was requested by @Pete
azure-resource-manager
add a comment |
up vote
0
down vote
favorite
I am deploying an arm template that contains the following resources
Microsoft.Storage/storageAccount
Microsoft.Sql/servers
Microsoft.Sql/servers/auditPolicies
Now everything worked until I started changing the values for the auditPolicies
object. Here are the steps I took until the InternalServerError
occurred.
- Added the
auditState
property and set its value toDisabled
. Deployment Successful. - Changed the
auditState
property toEnabled
. Deployment failed. Error states that thestorageAccountName
is required. - Added
storageAccountName
and set its value to the name of the storage account. Deployment failed. Error states thatstorageAccountKey
. - Added
storageAccountKey
and set its value tokey1
of the storage account'skeys
object. Deployment failed. Internal Server Error - "An Error has occurred while saving Auditing settings, please try again later". Additionally, the errors cause the deployment to run indefinitely. Though I am not concerned about that aspect.
The following is the complete template.
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters":
"app-name-prefix":
"type": "string",
"minLength": 1
,
"app-locations":
"type": "array",
"minLength": 1
,
"app-friendly-names":
"type": "array",
"minLength": 1
,
"db-user-admin-username":
"type": "securestring"
,
"db-user-admin-password":
"type": "securestring"
,
"database-audit-enabled":
"defaultValue": "Enabled",
"allowedValues": [
"Enabled",
"Disabled"
],
"type": "string"
,
"storage-kind":
"defaultValue": "BlobStorage",
"allowedValues": [
"StorageV2",
"BlobStorage"
],
"type": "string"
,
"storage-sku":
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
],
"type": "string"
,
"variables":
"db-service-name": "[concat(parameters('app-name-prefix'), '-database-service-')]",
"storage-name": "[concat(toLower(parameters('app-name-prefix')), 'auditstorage')]"
,
"resources": [
"name": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"type": "Microsoft.Storage/storageAccounts",
"sku":
"name": "[parameters('storage-sku')]"
,
"kind": "[parameters('storage-kind')]",
"apiVersion": "2018-02-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"count": "[length(parameters('app-locations'))]",
"name": "storageCopy"
,
"properties":
"supportsHttpsTrafficOnly": true,
"accessTier": "Hot",
"encryption":
"services":
"blob":
"enabled": true
,
"file":
"enabled": true
,
"keySource": "Microsoft.Storage"
,
"type": "Microsoft.Sql/servers",
"name": "[concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()])]",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"name": "databaseServiceCopy",
"count": "[length(parameters('app-locations'))]"
,
"properties":
"administratorLogin": "[parameters('db-user-admin-username')]",
"administratorLoginPassword": "[parameters('db-user-admin-password')]",
"version": "12.0"
,
"resources": [
"type": "auditingPolicies",
"name": "Default",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"properties":
"auditingState": "[parameters('database-audit-enabled')]",
"storageAccountName": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"storageAccountKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]"
,
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
]
]
]
What am I missing that will help resolve this issue? What do I need to do to stop this internal server error?
I have added the complete template as was requested by @Pete
azure-resource-manager
Could you rip out the parameters and paste the actual values so that I can recreate the error?
– Pete
Nov 13 at 11:23
@pete there are no special values that would be revealed by supplying them. all are strings, except the auditingState value which is a boolean. ListKeys pulls the value out of my storage account and that value is meant to stay secret by design. but in essence it is an alphanumeric string. Additionally, before the properties were added to the auditing Policy object, this script works
– Itanex
Nov 13 at 18:36
Sure - but I just want to copy and paste the template to recreate the problem, I don't want to parse the functions out. It was 1:00am and I was too tired.
– Pete
Nov 13 at 21:12
@pete I updated the question with the details you requested. I had left them out for brevity. Though I have also come to the proper solution for my situation.
– Itanex
Nov 14 at 23:16
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am deploying an arm template that contains the following resources
Microsoft.Storage/storageAccount
Microsoft.Sql/servers
Microsoft.Sql/servers/auditPolicies
Now everything worked until I started changing the values for the auditPolicies
object. Here are the steps I took until the InternalServerError
occurred.
- Added the
auditState
property and set its value toDisabled
. Deployment Successful. - Changed the
auditState
property toEnabled
. Deployment failed. Error states that thestorageAccountName
is required. - Added
storageAccountName
and set its value to the name of the storage account. Deployment failed. Error states thatstorageAccountKey
. - Added
storageAccountKey
and set its value tokey1
of the storage account'skeys
object. Deployment failed. Internal Server Error - "An Error has occurred while saving Auditing settings, please try again later". Additionally, the errors cause the deployment to run indefinitely. Though I am not concerned about that aspect.
The following is the complete template.
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters":
"app-name-prefix":
"type": "string",
"minLength": 1
,
"app-locations":
"type": "array",
"minLength": 1
,
"app-friendly-names":
"type": "array",
"minLength": 1
,
"db-user-admin-username":
"type": "securestring"
,
"db-user-admin-password":
"type": "securestring"
,
"database-audit-enabled":
"defaultValue": "Enabled",
"allowedValues": [
"Enabled",
"Disabled"
],
"type": "string"
,
"storage-kind":
"defaultValue": "BlobStorage",
"allowedValues": [
"StorageV2",
"BlobStorage"
],
"type": "string"
,
"storage-sku":
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
],
"type": "string"
,
"variables":
"db-service-name": "[concat(parameters('app-name-prefix'), '-database-service-')]",
"storage-name": "[concat(toLower(parameters('app-name-prefix')), 'auditstorage')]"
,
"resources": [
"name": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"type": "Microsoft.Storage/storageAccounts",
"sku":
"name": "[parameters('storage-sku')]"
,
"kind": "[parameters('storage-kind')]",
"apiVersion": "2018-02-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"count": "[length(parameters('app-locations'))]",
"name": "storageCopy"
,
"properties":
"supportsHttpsTrafficOnly": true,
"accessTier": "Hot",
"encryption":
"services":
"blob":
"enabled": true
,
"file":
"enabled": true
,
"keySource": "Microsoft.Storage"
,
"type": "Microsoft.Sql/servers",
"name": "[concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()])]",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"name": "databaseServiceCopy",
"count": "[length(parameters('app-locations'))]"
,
"properties":
"administratorLogin": "[parameters('db-user-admin-username')]",
"administratorLoginPassword": "[parameters('db-user-admin-password')]",
"version": "12.0"
,
"resources": [
"type": "auditingPolicies",
"name": "Default",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"properties":
"auditingState": "[parameters('database-audit-enabled')]",
"storageAccountName": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"storageAccountKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]"
,
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
]
]
]
What am I missing that will help resolve this issue? What do I need to do to stop this internal server error?
I have added the complete template as was requested by @Pete
azure-resource-manager
I am deploying an arm template that contains the following resources
Microsoft.Storage/storageAccount
Microsoft.Sql/servers
Microsoft.Sql/servers/auditPolicies
Now everything worked until I started changing the values for the auditPolicies
object. Here are the steps I took until the InternalServerError
occurred.
- Added the
auditState
property and set its value toDisabled
. Deployment Successful. - Changed the
auditState
property toEnabled
. Deployment failed. Error states that thestorageAccountName
is required. - Added
storageAccountName
and set its value to the name of the storage account. Deployment failed. Error states thatstorageAccountKey
. - Added
storageAccountKey
and set its value tokey1
of the storage account'skeys
object. Deployment failed. Internal Server Error - "An Error has occurred while saving Auditing settings, please try again later". Additionally, the errors cause the deployment to run indefinitely. Though I am not concerned about that aspect.
The following is the complete template.
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters":
"app-name-prefix":
"type": "string",
"minLength": 1
,
"app-locations":
"type": "array",
"minLength": 1
,
"app-friendly-names":
"type": "array",
"minLength": 1
,
"db-user-admin-username":
"type": "securestring"
,
"db-user-admin-password":
"type": "securestring"
,
"database-audit-enabled":
"defaultValue": "Enabled",
"allowedValues": [
"Enabled",
"Disabled"
],
"type": "string"
,
"storage-kind":
"defaultValue": "BlobStorage",
"allowedValues": [
"StorageV2",
"BlobStorage"
],
"type": "string"
,
"storage-sku":
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
],
"type": "string"
,
"variables":
"db-service-name": "[concat(parameters('app-name-prefix'), '-database-service-')]",
"storage-name": "[concat(toLower(parameters('app-name-prefix')), 'auditstorage')]"
,
"resources": [
"name": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"type": "Microsoft.Storage/storageAccounts",
"sku":
"name": "[parameters('storage-sku')]"
,
"kind": "[parameters('storage-kind')]",
"apiVersion": "2018-02-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"count": "[length(parameters('app-locations'))]",
"name": "storageCopy"
,
"properties":
"supportsHttpsTrafficOnly": true,
"accessTier": "Hot",
"encryption":
"services":
"blob":
"enabled": true
,
"file":
"enabled": true
,
"keySource": "Microsoft.Storage"
,
"type": "Microsoft.Sql/servers",
"name": "[concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()])]",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy":
"name": "databaseServiceCopy",
"count": "[length(parameters('app-locations'))]"
,
"properties":
"administratorLogin": "[parameters('db-user-admin-username')]",
"administratorLoginPassword": "[parameters('db-user-admin-password')]",
"version": "12.0"
,
"resources": [
"type": "auditingPolicies",
"name": "Default",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"properties":
"auditingState": "[parameters('database-audit-enabled')]",
"storageAccountName": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"storageAccountKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]"
,
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
]
]
]
What am I missing that will help resolve this issue? What do I need to do to stop this internal server error?
I have added the complete template as was requested by @Pete
azure-resource-manager
azure-resource-manager
edited Nov 14 at 23:15
asked Nov 9 at 18:25
Itanex
869921
869921
Could you rip out the parameters and paste the actual values so that I can recreate the error?
– Pete
Nov 13 at 11:23
@pete there are no special values that would be revealed by supplying them. all are strings, except the auditingState value which is a boolean. ListKeys pulls the value out of my storage account and that value is meant to stay secret by design. but in essence it is an alphanumeric string. Additionally, before the properties were added to the auditing Policy object, this script works
– Itanex
Nov 13 at 18:36
Sure - but I just want to copy and paste the template to recreate the problem, I don't want to parse the functions out. It was 1:00am and I was too tired.
– Pete
Nov 13 at 21:12
@pete I updated the question with the details you requested. I had left them out for brevity. Though I have also come to the proper solution for my situation.
– Itanex
Nov 14 at 23:16
add a comment |
Could you rip out the parameters and paste the actual values so that I can recreate the error?
– Pete
Nov 13 at 11:23
@pete there are no special values that would be revealed by supplying them. all are strings, except the auditingState value which is a boolean. ListKeys pulls the value out of my storage account and that value is meant to stay secret by design. but in essence it is an alphanumeric string. Additionally, before the properties were added to the auditing Policy object, this script works
– Itanex
Nov 13 at 18:36
Sure - but I just want to copy and paste the template to recreate the problem, I don't want to parse the functions out. It was 1:00am and I was too tired.
– Pete
Nov 13 at 21:12
@pete I updated the question with the details you requested. I had left them out for brevity. Though I have also come to the proper solution for my situation.
– Itanex
Nov 14 at 23:16
Could you rip out the parameters and paste the actual values so that I can recreate the error?
– Pete
Nov 13 at 11:23
Could you rip out the parameters and paste the actual values so that I can recreate the error?
– Pete
Nov 13 at 11:23
@pete there are no special values that would be revealed by supplying them. all are strings, except the auditingState value which is a boolean. ListKeys pulls the value out of my storage account and that value is meant to stay secret by design. but in essence it is an alphanumeric string. Additionally, before the properties were added to the auditing Policy object, this script works
– Itanex
Nov 13 at 18:36
@pete there are no special values that would be revealed by supplying them. all are strings, except the auditingState value which is a boolean. ListKeys pulls the value out of my storage account and that value is meant to stay secret by design. but in essence it is an alphanumeric string. Additionally, before the properties were added to the auditing Policy object, this script works
– Itanex
Nov 13 at 18:36
Sure - but I just want to copy and paste the template to recreate the problem, I don't want to parse the functions out. It was 1:00am and I was too tired.
– Pete
Nov 13 at 21:12
Sure - but I just want to copy and paste the template to recreate the problem, I don't want to parse the functions out. It was 1:00am and I was too tired.
– Pete
Nov 13 at 21:12
@pete I updated the question with the details you requested. I had left them out for brevity. Though I have also come to the proper solution for my situation.
– Itanex
Nov 14 at 23:16
@pete I updated the question with the details you requested. I had left them out for brevity. Though I have also come to the proper solution for my situation.
– Itanex
Nov 14 at 23:16
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
I have found the answer after connecting with Azure Support.
The resource type: Microsoft.Sql/servers/auditingPolicies
is no longer supported and in the next few weeks Azure Resource Manager will no longer support this completely.
This resource type refers directly to table auditing, which has been reported as being deprecated for blob auditing. Though the documentation at this time does not directly report it. The docs will be updated in the coming days after this post, by the owners.
To enable the auditing you need to use the Microsoft.Sql/servers/auditingSettings
object. The documentation on this is coming and until it does you will be directed to documentation for the database version of this resource type Microsoft.Sql/servers/databases/auditingSettings
.
Auditing settings work much like the Auto-Tuning advisors. You can set either server or database level settings. The server settings will be inherited by the database if the database has not been configured directly.
This is a sample of the auditingSettings
object that I use instead of the auditingPolicies
object above. It is nested just the same.
"apiVersion": "2017-03-01-preview",
"type": "auditingSettings",
"name": "DefaultAuditingSettings",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
],
"properties":
"state": "Enabled",
"storageEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts', '/', variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').primaryEndpoints.blob]",
"storageAccountAccessKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]",
"storageAccountSubscriptionId": "[subscription().subscriptionId]",
"isStorageSecondaryKeyInUse": false,
"retentionDays": "30"
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I have found the answer after connecting with Azure Support.
The resource type: Microsoft.Sql/servers/auditingPolicies
is no longer supported and in the next few weeks Azure Resource Manager will no longer support this completely.
This resource type refers directly to table auditing, which has been reported as being deprecated for blob auditing. Though the documentation at this time does not directly report it. The docs will be updated in the coming days after this post, by the owners.
To enable the auditing you need to use the Microsoft.Sql/servers/auditingSettings
object. The documentation on this is coming and until it does you will be directed to documentation for the database version of this resource type Microsoft.Sql/servers/databases/auditingSettings
.
Auditing settings work much like the Auto-Tuning advisors. You can set either server or database level settings. The server settings will be inherited by the database if the database has not been configured directly.
This is a sample of the auditingSettings
object that I use instead of the auditingPolicies
object above. It is nested just the same.
"apiVersion": "2017-03-01-preview",
"type": "auditingSettings",
"name": "DefaultAuditingSettings",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
],
"properties":
"state": "Enabled",
"storageEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts', '/', variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').primaryEndpoints.blob]",
"storageAccountAccessKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]",
"storageAccountSubscriptionId": "[subscription().subscriptionId]",
"isStorageSecondaryKeyInUse": false,
"retentionDays": "30"
add a comment |
up vote
0
down vote
accepted
I have found the answer after connecting with Azure Support.
The resource type: Microsoft.Sql/servers/auditingPolicies
is no longer supported and in the next few weeks Azure Resource Manager will no longer support this completely.
This resource type refers directly to table auditing, which has been reported as being deprecated for blob auditing. Though the documentation at this time does not directly report it. The docs will be updated in the coming days after this post, by the owners.
To enable the auditing you need to use the Microsoft.Sql/servers/auditingSettings
object. The documentation on this is coming and until it does you will be directed to documentation for the database version of this resource type Microsoft.Sql/servers/databases/auditingSettings
.
Auditing settings work much like the Auto-Tuning advisors. You can set either server or database level settings. The server settings will be inherited by the database if the database has not been configured directly.
This is a sample of the auditingSettings
object that I use instead of the auditingPolicies
object above. It is nested just the same.
"apiVersion": "2017-03-01-preview",
"type": "auditingSettings",
"name": "DefaultAuditingSettings",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
],
"properties":
"state": "Enabled",
"storageEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts', '/', variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').primaryEndpoints.blob]",
"storageAccountAccessKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]",
"storageAccountSubscriptionId": "[subscription().subscriptionId]",
"isStorageSecondaryKeyInUse": false,
"retentionDays": "30"
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I have found the answer after connecting with Azure Support.
The resource type: Microsoft.Sql/servers/auditingPolicies
is no longer supported and in the next few weeks Azure Resource Manager will no longer support this completely.
This resource type refers directly to table auditing, which has been reported as being deprecated for blob auditing. Though the documentation at this time does not directly report it. The docs will be updated in the coming days after this post, by the owners.
To enable the auditing you need to use the Microsoft.Sql/servers/auditingSettings
object. The documentation on this is coming and until it does you will be directed to documentation for the database version of this resource type Microsoft.Sql/servers/databases/auditingSettings
.
Auditing settings work much like the Auto-Tuning advisors. You can set either server or database level settings. The server settings will be inherited by the database if the database has not been configured directly.
This is a sample of the auditingSettings
object that I use instead of the auditingPolicies
object above. It is nested just the same.
"apiVersion": "2017-03-01-preview",
"type": "auditingSettings",
"name": "DefaultAuditingSettings",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
],
"properties":
"state": "Enabled",
"storageEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts', '/', variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').primaryEndpoints.blob]",
"storageAccountAccessKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]",
"storageAccountSubscriptionId": "[subscription().subscriptionId]",
"isStorageSecondaryKeyInUse": false,
"retentionDays": "30"
I have found the answer after connecting with Azure Support.
The resource type: Microsoft.Sql/servers/auditingPolicies
is no longer supported and in the next few weeks Azure Resource Manager will no longer support this completely.
This resource type refers directly to table auditing, which has been reported as being deprecated for blob auditing. Though the documentation at this time does not directly report it. The docs will be updated in the coming days after this post, by the owners.
To enable the auditing you need to use the Microsoft.Sql/servers/auditingSettings
object. The documentation on this is coming and until it does you will be directed to documentation for the database version of this resource type Microsoft.Sql/servers/databases/auditingSettings
.
Auditing settings work much like the Auto-Tuning advisors. You can set either server or database level settings. The server settings will be inherited by the database if the database has not been configured directly.
This is a sample of the auditingSettings
object that I use instead of the auditingPolicies
object above. It is nested just the same.
"apiVersion": "2017-03-01-preview",
"type": "auditingSettings",
"name": "DefaultAuditingSettings",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
],
"properties":
"state": "Enabled",
"storageEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts', '/', variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').primaryEndpoints.blob]",
"storageAccountAccessKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]",
"storageAccountSubscriptionId": "[subscription().subscriptionId]",
"isStorageSecondaryKeyInUse": false,
"retentionDays": "30"
answered Nov 14 at 22:40
Itanex
869921
869921
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231398%2finternal-server-error-when-deploying-arm-template%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Could you rip out the parameters and paste the actual values so that I can recreate the error?
– Pete
Nov 13 at 11:23
@pete there are no special values that would be revealed by supplying them. all are strings, except the auditingState value which is a boolean. ListKeys pulls the value out of my storage account and that value is meant to stay secret by design. but in essence it is an alphanumeric string. Additionally, before the properties were added to the auditing Policy object, this script works
– Itanex
Nov 13 at 18:36
Sure - but I just want to copy and paste the template to recreate the problem, I don't want to parse the functions out. It was 1:00am and I was too tired.
– Pete
Nov 13 at 21:12
@pete I updated the question with the details you requested. I had left them out for brevity. Though I have also come to the proper solution for my situation.
– Itanex
Nov 14 at 23:16