-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Would be nice to be able to deploy the CRC/SNC with a given AMI image ID, instead of letting mapt search from it.
I currently do this with this hacky code:
// Get AMI
amiID := os.Getenv("CUSTOM_AMI_ID")
var ami *ec2.LookupAmiResult
var err error
if amiID == "" {
logging.Info("CUSTOM_AMI_ID not set, searching for the right AMI in AWS ...")
ami, err = amiSVC.GetAMIByName(ctx,
fmt.Sprintf("%s*", amiName(r.version, r.arch)),
[]string{"self", amiOwner},
map[string]string{
"architecture": *r.arch})
if err != nil {
return err
}
} else {
ami = &ec2.LookupAmiResult{
Id: amiID, // Your custom AMI ID
}
}
which allows me to launch
CUSTOM_AMI_ID=ami-... out/mapt aws openshift-snc create ...
but that could be made more user-friendly
Metadata
Metadata
Assignees
Labels
No labels