Skip to content

Commit

Permalink
aws: ensure users set ami id for c2s regions
Browse files Browse the repository at this point in the history
As with US Govcloud and China partitions, C2S partitions do not allow copying AMI
from commercial region us-east-1. Therefore the users need to provide the AMI for
control plane and compute.

https://issues.redhat.com/browse/CORS-1582
  • Loading branch information
staebler committed Oct 27, 2020
1 parent 9c8baf2 commit a60d8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/types/aws/validation/machinepool.go
Expand Up @@ -37,7 +37,7 @@ func ValidateAMIID(platform *aws.Platform, p *aws.MachinePool, fldPath *field.Pa

// regions is a list of regions for which the user should set AMI ID as copying the AMI to these regions
// is known to not be supported.
regions := sets.NewString("us-gov-west-1", "us-gov-east-1", "cn-north-1", "cn-northwest-1")
regions := sets.NewString("us-gov-west-1", "us-gov-east-1", "us-iso-east-1", "cn-north-1", "cn-northwest-1")
if pool.AMIID == "" && regions.Has(platform.Region) {
allErrs = append(allErrs, field.Required(fldPath, fmt.Sprintf("AMI ID must be provided for regions %s", strings.Join(regions.List(), ", "))))
}
Expand Down

0 comments on commit a60d8c5

Please sign in to comment.