Restrict deregistered AMIs to those owned by self.

This commit is contained in:
Matthew Hooker 2018-04-05 13:29:32 -07:00
parent 078434cded
commit 302b1988a5
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 1 additions and 0 deletions

View File

@ -41,6 +41,7 @@ func (s *StepDeregisterAMI) Run(_ context.Context, state multistep.StateBag) mul
))
resp, err := regionconn.DescribeImages(&ec2.DescribeImagesInput{
Owners: aws.StringSlice([]string{"self"}),
Filters: []*ec2.Filter{{
Name: aws.String("name"),
Values: []*string{aws.String(s.AMIName)},