Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample Azure Generated Automation Script
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"servers_coopersclouddbserver_name": {
"defaultValue": "coopersclouddbserver",
"type": "String"
},
"keys_ServiceManaged_name": {
"defaultValue": "ServiceManaged",
"type": "String"
},
"auditingPolicies_Default_name": {
"defaultValue": "Default",
"type": "String"
},
"databases_coopersclouddb_name": {
"defaultValue": "coopersclouddb",
"type": "String"
},
"encryptionProtector_current_name": {
"defaultValue": "current",
"type": "String"
},
"firewallRules_AllowAllWindowsAzureIps_name": {
"defaultValue": "AllowAllWindowsAzureIps",
"type": "String"
},
"auditingPolicies_Default_name_1": {
"defaultValue": "Default",
"type": "String"
},
"databases_master_name": {
"defaultValue": "master",
"type": "String"
},
"geoBackupPolicies_Default_name": {
"defaultValue": "Default",
"type": "String"
},
"advisors_DropIndex_name": {
"defaultValue": "DropIndex",
"type": "String"
},
"backupLongTermRetentionVaults_RegisteredVault_name": {
"defaultValue": "RegisteredVault",
"type": "String"
},
"advisors_CreateIndex_name": {
"defaultValue": "CreateIndex",
"type": "String"
},
"auditingPolicies_Default_name_2": {
"defaultValue": "Default",
"type": "String"
},
"geoBackupPolicies_Default_name_1": {
"defaultValue": "Default",
"type": "String"
},
"transparentDataEncryption_current_name": {
"defaultValue": "current",
"type": "String"
},
"advisors_ForceLastGoodPlan_name": {
"defaultValue": "ForceLastGoodPlan",
"type": "String"
},
"advisors_DbParameterization_name": {
"defaultValue": "DbParameterization",
"type": "String"
},
"backupLongTermRetentionPolicies_Default_name": {
"defaultValue": "Default",
"type": "String"
},
"transparentDataEncryption_current_name_1": {
"defaultValue": "current",
"type": "String"
},
"backupLongTermRetentionPolicies_Default_name_1": {
"defaultValue": "Default",
"type": "String"
}
},
"variables": {},
"resources": [
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver'.",
"type": "Microsoft.Sql/servers",
"kind": "v12.0",
"name": "[parameters('servers_coopersclouddbserver_name')]",
"apiVersion": "2015-05-01-preview",
"location": "centralus",
"scale": null,
"properties": {
"administratorLogin": "cooper.admin",
"version": "12.0"
},
"dependsOn": []
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/auditingPolicies/Default'.",
"type": "Microsoft.Sql/servers/auditingPolicies",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('auditingPolicies_Default_name'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"auditingState": "New",
"eventTypesToAudit": "PlainSQL_Success,PlainSQL_Failure,ParameterizedSQL_Success,ParameterizedSQL_Failure,StoredProcedure_Success,StoredProcedure_Failure,Login_Success,Login_Failure,TransactionManagement_Success,TransactionManagement_Failure",
"storageAccountName": null,
"storageAccountKey": null,
"storageAccountSecondaryKey": null,
"storageTableEndpoint": null,
"storageAccountResourceGroupName": null,
"storageAccountSubscriptionId": null,
"fullAuditLogsTableName": "SQLDBAuditLogsCoopersclouddbserver",
"auditLogsTableName": "Coopersclouddbserver",
"retentionDays": "0"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/backupLongTermRetentionVaults/RegisteredVault'.",
"type": "Microsoft.Sql/servers/backupLongTermRetentionVaults",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('backupLongTermRetentionVaults_RegisteredVault_name'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"recoveryServicesVaultResourceId": null
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb'.",
"type": "Microsoft.Sql/servers/databases",
"kind": "v12.0,user",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'))]",
"apiVersion": "2014-04-01-preview",
"location": "Central US",
"scale": null,
"properties": {
"databaseId": "63530027-00ee-4d12-b365-3d0cfb3f2f4a",
"edition": "Basic",
"status": "Online",
"serviceLevelObjective": "Basic",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": "1073741824",
"creationDate": "2018-04-14T20:27:40.84Z",
"currentServiceObjectiveId": "dd6d99bb-f193-4ec1-86f2-43d3bccbc49c",
"requestedServiceObjectiveId": "dd6d99bb-f193-4ec1-86f2-43d3bccbc49c",
"requestedServiceObjectiveName": "Basic",
"sampleName": null,
"defaultSecondaryLocation": "East US 2",
"earliestRestoreDate": "2018-04-14T20:58:34.69Z",
"elasticPoolName": null,
"containmentState": 2,
"readScale": "Disabled",
"failoverGroupId": null,
"zoneRedundant": false,
"isUpgradeRequested": false
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/firewallRules/AllowAllWindowsAzureIps'.",
"type": "Microsoft.Sql/servers/firewallRules",
"kind": "v12.0",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('firewallRules_AllowAllWindowsAzureIps_name'))]",
"apiVersion": "2014-04-01-preview",
"location": "Central US",
"scale": null,
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "0.0.0.0"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/encryptionProtector/current'.",
"type": "Microsoft.Sql/servers/encryptionProtector",
"kind": "servicemanaged",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('encryptionProtector_current_name'))]",
"apiVersion": "2015-05-01-preview",
"scale": null,
"properties": {
"serverKeyName": "ServiceManaged",
"serverKeyType": "ServiceManaged"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/keys/ServiceManaged'.",
"type": "Microsoft.Sql/servers/keys",
"kind": "servicemanaged",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('keys_ServiceManaged_name'))]",
"apiVersion": "2015-05-01-preview",
"scale": null,
"properties": {
"serverKeyType": "[parameters('keys_ServiceManaged_name')]"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/advisors/CreateIndex'.",
"type": "Microsoft.Sql/servers/databases/advisors",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('advisors_CreateIndex_name'))]",
"apiVersion": "2014-04-01",
"scale": null,
"properties": {
"autoExecuteValue": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/advisors/DropIndex'.",
"type": "Microsoft.Sql/servers/databases/advisors",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('advisors_DropIndex_name'))]",
"apiVersion": "2014-04-01",
"scale": null,
"properties": {
"autoExecuteValue": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/advisors/DbParameterization'.",
"type": "Microsoft.Sql/servers/databases/advisors",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('advisors_DbParameterization_name'))]",
"apiVersion": "2014-04-01",
"scale": null,
"properties": {
"autoExecuteValue": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/advisors/ForceLastGoodPlan'.",
"type": "Microsoft.Sql/servers/databases/advisors",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('advisors_ForceLastGoodPlan_name'))]",
"apiVersion": "2014-04-01",
"scale": null,
"properties": {
"autoExecuteValue": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/auditingPolicies/Default'.",
"type": "Microsoft.Sql/servers/databases/auditingPolicies",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('auditingPolicies_Default_name_2'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"auditingState": "New",
"eventTypesToAudit": "PlainSQL_Success,PlainSQL_Failure,ParameterizedSQL_Success,ParameterizedSQL_Failure,StoredProcedure_Success,StoredProcedure_Failure,Login_Success,Login_Failure,TransactionManagement_Success,TransactionManagement_Failure",
"storageAccountName": null,
"storageAccountKey": null,
"storageAccountSecondaryKey": null,
"storageTableEndpoint": null,
"storageAccountResourceGroupName": null,
"storageAccountSubscriptionId": null,
"useServerDefault": "Enabled",
"fullAuditLogsTableName": "SQLDBAuditLogsCoopersclouddbserverCoopersclouddb",
"auditLogsTableName": "CoopersclouddbserverCoopersclouddb",
"retentionDays": "0"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/backupLongTermRetentionPolicies/Default'.",
"type": "Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('backupLongTermRetentionPolicies_Default_name_1'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"state": "Disabled",
"recoveryServicesBackupPolicyResourceId": null
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/geoBackupPolicies/Default'.",
"type": "Microsoft.Sql/servers/databases/geoBackupPolicies",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('geoBackupPolicies_Default_name_1'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"state": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/coopersclouddb/transparentDataEncryption/current'.",
"type": "Microsoft.Sql/servers/databases/transparentDataEncryption",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_coopersclouddb_name'), '/', parameters('transparentDataEncryption_current_name_1'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"status": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]",
"[resourceId('Microsoft.Sql/servers/databases', parameters('servers_coopersclouddbserver_name'), parameters('databases_coopersclouddb_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/master/auditingPolicies/Default'.",
"type": "Microsoft.Sql/servers/databases/auditingPolicies",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_master_name'), '/', parameters('auditingPolicies_Default_name_1'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"auditingState": "New",
"eventTypesToAudit": "PlainSQL_Success,PlainSQL_Failure,ParameterizedSQL_Success,ParameterizedSQL_Failure,StoredProcedure_Success,StoredProcedure_Failure,Login_Success,Login_Failure,TransactionManagement_Success,TransactionManagement_Failure",
"storageAccountName": null,
"storageAccountKey": null,
"storageAccountSecondaryKey": null,
"storageTableEndpoint": null,
"storageAccountResourceGroupName": null,
"storageAccountSubscriptionId": null,
"useServerDefault": "Enabled",
"fullAuditLogsTableName": "SQLDBAuditLogsCoopersclouddbserverMaster",
"auditLogsTableName": "CoopersclouddbserverMaster",
"retentionDays": "0"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/master/backupLongTermRetentionPolicies/Default'.",
"type": "Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_master_name'), '/', parameters('backupLongTermRetentionPolicies_Default_name'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"state": "Disabled",
"recoveryServicesBackupPolicyResourceId": null
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/master/geoBackupPolicies/Default'.",
"type": "Microsoft.Sql/servers/databases/geoBackupPolicies",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_master_name'), '/', parameters('geoBackupPolicies_Default_name'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"state": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
},
{
"comments": "Generalized from resource: '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/sqldb-resourcegroup/providers/Microsoft.Sql/servers/coopersclouddbserver/databases/master/transparentDataEncryption/current'.",
"type": "Microsoft.Sql/servers/databases/transparentDataEncryption",
"name": "[concat(parameters('servers_coopersclouddbserver_name'), '/', parameters('databases_master_name'), '/', parameters('transparentDataEncryption_current_name'))]",
"apiVersion": "2014-04-01",
"location": "Central US",
"scale": null,
"properties": {
"status": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('servers_coopersclouddbserver_name'))]"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.