Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include only AMI's owned by caller during pre-validate #354

Merged
merged 1 commit into from
Apr 25, 2023
Merged
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
2 changes: 1 addition & 1 deletion builder/common/step_pre_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

// StepPreValidate provides an opportunity to pre-validate any configuration for
// the build before actually doing any time consuming work
//
type StepPreValidate struct {
DestAmiName string
ForceDeregister bool
Expand Down Expand Up @@ -99,6 +98,7 @@ func (s *StepPreValidate) Run(ctx context.Context, state multistep.StateBag) mul

ui.Say(fmt.Sprintf("Prevalidating AMI Name: %s", s.DestAmiName))
req, resp := ec2conn.DescribeImagesRequest(&ec2.DescribeImagesInput{
Owners: []*string{aws.String("self")},
Filters: []*ec2.Filter{{
Name: aws.String("name"),
Values: []*string{aws.String(s.DestAmiName)},
Expand Down