awsupload: Add description to snapshots
Make it easier to tell which snapshot goes with each AMI by labeling them with a description. Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
parent
1dbc271506
commit
fc7f6349eb
1 changed files with 3 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package awsupload
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
|
|
@ -115,8 +116,10 @@ func WaitUntilImportSnapshotTaskCompletedWithContext(c *ec2.EC2, ctx aws.Context
|
|||
|
||||
func (a *AWS) Register(name, bucket, key string) (*string, error) {
|
||||
log.Printf("[AWS] 📥 Importing snapshot from image: %s/%s", bucket, key)
|
||||
snapshotDescription := fmt.Sprintf("Image Builder AWS Import of %s", name)
|
||||
importTaskOutput, err := a.importer.ImportSnapshot(
|
||||
&ec2.ImportSnapshotInput{
|
||||
Description: aws.String(snapshotDescription),
|
||||
DiskContainer: &ec2.SnapshotDiskContainer{
|
||||
UserBucket: &ec2.UserBucket{
|
||||
S3Bucket: aws.String(bucket),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue