Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/asset/rhcos/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func (i *Image) Generate(p asset.Parents) error {
defer cancel()
switch config.Platform.Name() {
case aws.Name:
if len(config.Platform.AWS.AMIID) > 0 {
osimage = config.Platform.AWS.AMIID
break
}
osimage, err = rhcos.AMI(ctx, config.Platform.AWS.Region)
case gcp.Name:
case libvirt.Name:
Expand Down
4 changes: 4 additions & 0 deletions pkg/types/aws/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package aws
// Platform stores all the global configuration that all machinesets
// use.
type Platform struct {
// AMIID is the AMI that should be used to boot machines for the cluster.
// If set, the AMI should belong to the same region as the cluster.
AMIID string `json:"amiID,omitempty"`

// Region specifies the AWS region where the cluster will be created.
Region string `json:"region"`

Expand Down