Randomize osDisk name for Azure Managed Image builds.

This fixes #6115
This commit is contained in:
Oskar Wycislak 2018-05-02 20:18:03 +02:00
parent 64d1265ab8
commit 78d68880c0
21 changed files with 21 additions and 23 deletions

View File

@ -90,7 +90,7 @@
"image": {
"uri": "https://localhost/custom.vhd"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"

View File

@ -167,7 +167,7 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
}

View File

@ -171,7 +171,7 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
}

View File

@ -144,7 +144,7 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
}

View File

@ -141,7 +141,7 @@
"image": {
"uri": "https://localhost/custom.vhd"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"

View File

@ -102,7 +102,7 @@
"image": {
"uri": "https://localhost/custom.vhd"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"

View File

@ -156,7 +156,7 @@
"image": {
"uri": "https://localhost/custom.vhd"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"

View File

@ -142,7 +142,7 @@
"image": {
"uri": "https://localhost/custom.vhd"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"

View File

@ -144,7 +144,7 @@
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux"
}
}

View File

@ -147,7 +147,7 @@
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux"
}
}

View File

@ -125,7 +125,7 @@
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux"
}
}

View File

@ -156,7 +156,7 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
}

View File

@ -159,7 +159,7 @@
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux"
}
}

View File

@ -103,7 +103,7 @@
"storageProfile": {
"osDisk": {
"osType": "Linux",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
},

View File

@ -111,7 +111,6 @@ func (s *TemplateBuilder) SetManagedDiskUrl(managedImageId string, storageAccoun
profile.ImageReference = &compute.ImageReference{
ID: &managedImageId,
}
profile.OsDisk.Name = to.StringPtr("osdisk")
profile.OsDisk.OsType = s.osType
profile.OsDisk.CreateOption = compute.FromImage
profile.OsDisk.Vhd = nil
@ -136,7 +135,6 @@ func (s *TemplateBuilder) SetManagedMarketplaceImage(location, publisher, offer,
Version: &version,
//ID: &imageID,
}
profile.OsDisk.Name = to.StringPtr("osdisk")
profile.OsDisk.OsType = s.osType
profile.OsDisk.CreateOption = compute.FromImage
profile.OsDisk.Vhd = nil
@ -583,7 +581,7 @@ const BasicTemplate = `{
},
"storageProfile": {
"osDisk": {
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
},

View File

@ -144,7 +144,7 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
}

View File

@ -141,7 +141,7 @@
"image": {
"uri": "http://azure/custom.vhd"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"

View File

@ -103,7 +103,7 @@
"image": {
"uri": "http://azure/custom.vhd"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Linux",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"

View File

@ -158,7 +158,7 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
}

View File

@ -183,7 +183,7 @@
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"osType": "Windows"
}
}

View File

@ -174,7 +174,7 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "osdisk",
"name": "[parameters('osDiskName')]",
"vhd": {
"uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
}