internal/awscloud: use AWS.Regions() from osbuild/images

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-08-06 13:46:59 +02:00 committed by Tomáš Hozza
parent 5d73c22bb5
commit 7645f60f27
4 changed files with 0 additions and 39 deletions

View file

@ -298,19 +298,6 @@ func (a *AWS) CopyImage(name, ami, sourceRegion string) (string, error) {
return *result.ImageId, nil
}
func (a *AWS) Regions() ([]string, error) {
out, err := a.ec2.DescribeRegions(context.Background(), &ec2.DescribeRegionsInput{})
if err != nil {
return nil, err
}
result := []string{}
for _, r := range out.Regions {
result = append(result, *r.RegionName)
}
return result, nil
}
func (a *AWS) DescribeImagesByName(name string) (*ec2.DescribeImagesOutput, error) {
return a.ec2.DescribeImages(
context.Background(),