From c61d04dd1f8ff2f535e44c2cd0b3f8fadce4ba9b Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 24 Jun 2014 12:16:57 -0500 Subject: [PATCH] Check to make sure key exists in tag list before using it Fixes #7910 --- cloud/ec2_asg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud/ec2_asg b/cloud/ec2_asg index 71c353569b2..0a5b7264a41 100755 --- a/cloud/ec2_asg +++ b/cloud/ec2_asg @@ -209,6 +209,8 @@ def create_autoscaling_group(connection, module): existing_tags = as_group.tags existing_tag_map = dict((tag.key, tag) for tag in existing_tags) for tag in set_tags: + if 'key' not in tag: + continue if ( not tag['key'] in existing_tag_map or existing_tag_map[tag['key']].value != tag['value'] or ('propagate_at_launch' in tag and