Skip to content

Commit

Permalink
Merge pull request #114 from base2Services/feature/alarm-tagging-fix
Browse files Browse the repository at this point in the history
Fix tagging for multiple alarm actions
  • Loading branch information
tarunmenon95 authored Aug 17, 2023
2 parents 754ce5c + 63b63bd commit af2be86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/cfnguardian/tagger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def tag_alarm(alarm, global_tags={})
logger.debug "Updating tags on alarm #{alarm_arn}"
new_tags.delete_if {|key, value| value.include?('?')}
begin
@client.tag_resource({
alarm_severity = new_tags["guardian:alarm:severity"]
if alarm_severity.is_a?(Array)
new_tags["guardian:alarm:severity"] = new_tags["guardian:alarm:severity"].join("/")
end
@client.tag_resource({
resource_arn: alarm_arn,
tags: new_tags.map {|key,value| {key: key, value: value}}
})
Expand Down
2 changes: 1 addition & 1 deletion lib/cfnguardian/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module CfnGuardian
VERSION = "0.11.4"
VERSION = "0.11.5"
CHANGE_SET_VERSION = VERSION.gsub('.', '-').freeze
end

0 comments on commit af2be86

Please sign in to comment.