@@ -41,6 +41,7 @@ const (
41
41
flagVolumeType = "volume-type"
42
42
flagVolumeIOPS = "volume-iops"
43
43
flagVolumeThroughput = "volume-throughput"
44
+ flagVolumeEncrypted = "volume-encrypted"
44
45
flagTargetAZ = "target-az"
45
46
)
46
47
@@ -54,6 +55,7 @@ func DefineRestoreSnapshotFlags(command *cobra.Command) {
54
55
command .Flags ().String (flagVolumeType , string (config .GP3Volume ), "volume type: gp3, io1, io2" )
55
56
command .Flags ().Int64 (flagVolumeIOPS , 0 , "volume iops(0 means default for that volume type)" )
56
57
command .Flags ().Int64 (flagVolumeThroughput , 0 , "volume throughout in MiB/s(0 means default for that volume type)" )
58
+ command .Flags ().Bool (flagVolumeEncrypted , false , "whether encryption is enabled for the volume" )
57
59
command .Flags ().String (flagProgressFile , "progress.txt" , "the file name of progress file" )
58
60
command .Flags ().String (flagTargetAZ , "" , "the target AZ for restored volumes" )
59
61
@@ -65,6 +67,7 @@ func DefineRestoreSnapshotFlags(command *cobra.Command) {
65
67
_ = command .Flags ().MarkHidden (flagVolumeType )
66
68
_ = command .Flags ().MarkHidden (flagVolumeIOPS )
67
69
_ = command .Flags ().MarkHidden (flagVolumeThroughput )
70
+ _ = command .Flags ().MarkHidden (flagVolumeEncrypted )
68
71
_ = command .Flags ().MarkHidden (flagProgressFile )
69
72
_ = command .Flags ().MarkHidden (flagTargetAZ )
70
73
}
@@ -238,7 +241,7 @@ func (h *restoreEBSMetaHelper) restoreVolumes(progress glue.Progress) (map[strin
238
241
}
239
242
}()
240
243
volumeIDMap , err = ec2Session .CreateVolumes (h .metaInfo ,
241
- string (h .cfg .VolumeType ), h .cfg .VolumeIOPS , h .cfg .VolumeThroughput , h .cfg .TargetAZ )
244
+ string (h .cfg .VolumeType ), h .cfg .VolumeIOPS , h .cfg .VolumeThroughput , h .cfg .VolumeEncrypted , h . cfg . TargetAZ )
242
245
if err != nil {
243
246
return nil , 0 , errors .Trace (err )
244
247
}
0 commit comments