Fix VM Restore Point templates (#4)
This commit is contained in:
Родитель
874c412ebd
Коммит
51ab2d6952
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"DiskName": {
|
||||
"type": "string",
|
||||
"defaultValue": "<DiskName>"
|
||||
},
|
||||
"DiskRestorePointResourceId": {
|
||||
"type": "string",
|
||||
"defaultValue": "/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Compute/restorePointCollections/<RestorePointCollectionName>/restorePoints/<RestorePointName>/diskRestorePoints/<DiskRestorePointName>"
|
||||
}
|
||||
},
|
||||
"resources": [{
|
||||
"type": "Microsoft.Compute/disks",
|
||||
"apiVersion": "2020-12-01",
|
||||
"name": "[parameters('DiskName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"creationData": {
|
||||
"createOption": "Restore",
|
||||
"sourceResourceId": "[parameters('DiskRestorePointResourceId')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,21 +2,23 @@
|
|||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"RPCName": {
|
||||
"RestorePointCollectionName": {
|
||||
"type": "string",
|
||||
"defaultValue": "<RestorePointCollectionName>"
|
||||
},
|
||||
"RPCResourceId": {
|
||||
"defaultValue": "/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Compute/restorePointCollections/<RestorePointCollectionName>",
|
||||
"type": "String"
|
||||
"RestorePointName": {
|
||||
"type": "string",
|
||||
"defaultValue": "<RestorePointName>"
|
||||
},
|
||||
"RestorePointCollectionResourceId": {
|
||||
"type": "string",
|
||||
"defaultValue": "/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Compute/restorePointCollections/<RestorePointCollectionName>"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"resources": [{
|
||||
"type": "Microsoft.Compute/restorePointCollections/restorePoints",
|
||||
"name": "[concat( parameters('RPCName'),'/rp1')]",
|
||||
"apiVersion": "2020-06-01"
|
||||
"name": "[concat(parameters('RestorePointCollectionName'),'/', parameters('RestorePointName'))]",
|
||||
"apiVersion": "2021-03-01"
|
||||
}
|
||||
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"RestorePointCollectionName": {
|
||||
"type": "string",
|
||||
"defaultValue": "<RestorePointCollectionName>"
|
||||
},
|
||||
"VMResourceId": {
|
||||
"type": "string",
|
||||
"defaultValue": "subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Compute/virtualMachines/<VMName>"
|
||||
}
|
||||
},
|
||||
"resources": [{
|
||||
"type": "Microsoft.Compute/restorePointCollections",
|
||||
"name": "[parameters('RestorePointCollectionName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2021-03-01",
|
||||
"properties": {
|
||||
"source": {
|
||||
"id": "[parameters('VMResourceId')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {},
|
||||
|
||||
|
||||
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Compute/disks",
|
||||
"apiVersion": "2020-12-01",
|
||||
"name": "restore_disk2",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
"properties": {
|
||||
"creationData": {
|
||||
"createOption": "Restore",
|
||||
"sourceResourceId": "/subscriptions/49151e6d-fa6e-4985-ae85-00548ec78853/resourceGroups/dfgdf_group/providers/Microsoft.Compute/restorePointCollections/dfgdf_rpc1/restorePoints/rp1/diskRestorePoints/datadisk1_55133b68-112a-4207-a967-75a24220b963"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"VMName": {
|
||||
"type": "string",
|
||||
"defaultValue": "<VMName>"
|
||||
},
|
||||
"VMId": {
|
||||
"defaultValue": "subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Compute/virtualMachines/<VMName>",
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Compute/restorePointCollections",
|
||||
"name": "[concat(parameters('VMName'),'_rpc')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2020-06-01",
|
||||
"properties": {
|
||||
"source": {
|
||||
"id": "[parameters('VMId')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче