Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Fix CloudWatch alarm template about dimensions #469

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/terraforming/template/tf/cloud_watch_alarm.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_cloudwatch_metric_alarm" "<%= normalize_module_name(alarm.alarm_na
actions_enabled = <%= alarm.actions_enabled %>
<%- end -%>
<%- unless alarm.dimensions.empty? -%>
dimensions {
dimensions = {
<% alarm.dimensions.each do |dimension| -%>
<%= dimension.name %> = "<%= dimension.value %>"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/terraforming/resource/cloud_watch_alarm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module Resource
threshold = "10000.0"
alarm_description = ""
alarm_actions = ["arn:aws:sns:region:account:lambda-alerts"]
dimensions {
dimensions = {
FunctionName = "beep-beep"
}
}
Expand Down