Skip to content

Commit

Permalink
Ensure Backup key has a valid value
Browse files Browse the repository at this point in the history
This tweaks the logic slightly to only snapshot instances that have a
the `Backup` tag and it is set to a value of `true`, `yes` or `1`.
Previously just the presence of the `Backup` tag (with any value) was
enough to mark an instance for inclusion.

Signed-off-by: Seth Chisamore <schisamo@chef.io>
  • Loading branch information
schisamo committed May 16, 2017
1 parent 876ea86 commit 3fb45e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schedule-ebs-snapshot-backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def lambda_handler(event, context):
reservations = ec.describe_instances(
Filters=[
{'Name': 'tag-key', 'Values': ['backup', 'Backup']},
{'Name': 'tag:Backup', 'Values': ['true', 'yes', '1']},
]
).get(
'Reservations', []
Expand Down

0 comments on commit 3fb45e9

Please sign in to comment.