Skip to content

Commit

Permalink
Fix tag name in GetEc2InstanceIdsByTag function
Browse files Browse the repository at this point in the history
  • Loading branch information
brikis98 committed Apr 22, 2016
1 parent dce1f72 commit 5d16a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func GetEc2InstanceIdsByTag(awsRegion string, tagName string, tagValue string) (
svc := ec2.New(session.New(), aws.NewConfig().WithRegion(awsRegion))

tagFilter := &ec2.Filter{
Name: aws.String(fmt.Sprintf("tag:key=%s", tagName)),
Name: aws.String(fmt.Sprintf("tag:%s", tagName)),
Values: []*string{aws.String(tagValue)},
}
output, err := svc.DescribeInstances(&ec2.DescribeInstancesInput{Filters: []*ec2.Filter{tagFilter}})
Expand Down

0 comments on commit 5d16a04

Please sign in to comment.