azure: pass full snapshot name when restoring disk

Signed-off-by: Steve Kriss <steve@heptio.com>
This commit is contained in:
Steve Kriss
2018-04-23 12:51:05 -07:00
parent 206bf3dfe3
commit 72d7e5e01d
+5 -1
View File
@@ -64,6 +64,10 @@ type snapshotIdentifier struct {
name string
}
func (si *snapshotIdentifier) String() string {
return getComputeResourceName(si.subscription, si.resourceGroup, snapshotsResource, si.name)
}
func getConfig() map[string]string {
cfg := map[string]string{
azureClientIDKey: "",
@@ -147,7 +151,7 @@ func (b *blockStore) CreateVolumeFromSnapshot(snapshotID, volumeType, volumeAZ s
Properties: &disk.Properties{
CreationData: &disk.CreationData{
CreateOption: disk.Copy,
SourceResourceID: &snapshotID,
SourceResourceID: stringPtr(snapshotIdentifier.String()),
},
AccountType: disk.StorageAccountTypes(volumeType),
},