terraform-exporter 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da876c668fbec0fa10d3d2e3b0db23df056343f5
|
4
|
+
data.tar.gz: ce7438ba8daea062a08e02ea1d15fc252740193c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db7298c3bd1ec0d68931db50a5d984148fc2f15254d898509c3bc3d1558c585d9d8437765ea5f698cfe3a23d406c055f202a30cf3fd7e215118cf63038c3c97
|
7
|
+
data.tar.gz: 673c4fcbc0c5a28437af0cd56d363111458b3506289e2e44525b1579fbaa4d6bcecd678fb49c5b2cc93066bcb12a75602a9aba1c5583ba226b2cad0f60445f10
|
@@ -76,7 +76,7 @@ module Terraformer
|
|
76
76
|
"name" => monitor["name"],
|
77
77
|
"type" => monitor["type"],
|
78
78
|
"message" => monitor["message"],
|
79
|
-
"escalation_message" => monitor["escalation_message"],
|
79
|
+
"escalation_message" => monitor["options"]["escalation_message"],
|
80
80
|
"query" => monitor["query"],
|
81
81
|
"notify_no_data" => monitor["options"]["notify_no_data"],
|
82
82
|
"no_data_timeframe" => monitor["options"]["no_data_timeframe"],
|
@@ -94,7 +94,7 @@ module Terraformer
|
|
94
94
|
option.each { |k, v| attributes["#{argument}.#{k}"] = v }
|
95
95
|
end
|
96
96
|
attributes["tags.%"] = monitor["tags"].length
|
97
|
-
monitor["tags"].each { |tag| attributes["tags.#{tag.split(":")[0]}"] = tag.split(":")[
|
97
|
+
monitor["tags"].each { |tag| attributes["tags.#{tag.split(":")[0]}"] = tag.split(":")[1] }
|
98
98
|
|
99
99
|
sanitize_monitor(attributes)
|
100
100
|
end
|
@@ -12,6 +12,9 @@ resource "aws_cloudwatch_metric_alarm" "<%= alarm.normalized_name %>" {
|
|
12
12
|
<%- unless alarm.ok_actions.empty? -%>
|
13
13
|
ok_actions = <%= alarm.ok_actions %>
|
14
14
|
<%- end -%>
|
15
|
+
<%- unless alarm.unit.nil? || alarm.unit == "" -%>
|
16
|
+
unit = "<%= alarm.unit %>"
|
17
|
+
<%- end -%>
|
15
18
|
<%- unless alarm.alarm_actions.empty? -%>
|
16
19
|
alarm_actions = <%= alarm.alarm_actions %>
|
17
20
|
<%- end -%>
|
@@ -10,8 +10,14 @@ EOF
|
|
10
10
|
<%- else -%>
|
11
11
|
message = "<%= monitor["message"] %>"
|
12
12
|
<%- end -%>
|
13
|
-
<%- unless monitor["escalation_message"].nil? -%>
|
14
|
-
|
13
|
+
<%- unless monitor["options"]["escalation_message"].nil? -%>
|
14
|
+
<%- if monitor["options"]["escalation_message"].include? "\n" -%>
|
15
|
+
escalation_message = <<EOF
|
16
|
+
<%= monitor["options"]["escalation_message"] %>
|
17
|
+
EOF
|
18
|
+
<%- else -%>
|
19
|
+
escalation_message = "<%= monitor["options"]["escalation_message"] %>"
|
20
|
+
<%- end -%>
|
15
21
|
<%- end -%>
|
16
22
|
|
17
23
|
thresholds {
|
@@ -27,8 +33,8 @@ EOF
|
|
27
33
|
<%- unless monitor["options"]["notify_no_data"].nil? -%>
|
28
34
|
notify_no_data = <%= monitor["options"]["notify_no_data"] %>
|
29
35
|
<%- end -%>
|
30
|
-
<%- unless monitor["options"]["no_data_timeframe
|
31
|
-
no_data_timeframe = <%= monitor["options"]["no_data_timeframe
|
36
|
+
<%- unless monitor["options"]["no_data_timeframe"].nil? -%>
|
37
|
+
no_data_timeframe = <%= monitor["options"]["no_data_timeframe"] %>
|
32
38
|
<%- end -%>
|
33
39
|
<%- unless monitor["options"]["renotify_interval"].nil? -%>
|
34
40
|
renotify_interval = <%= monitor["options"]["renotify_interval"] %>
|
@@ -52,15 +58,15 @@ EOF
|
|
52
58
|
|
53
59
|
silenced {
|
54
60
|
<% monitor["options"]["silenced"].each do |key, value| -%>
|
55
|
-
"<%= key %>" = "<%= value || 0 %>"
|
61
|
+
"<%= key %>" = "<%= value || 0 %>"
|
56
62
|
<%- end -%>
|
57
63
|
}
|
58
64
|
<%- end -%>
|
59
|
-
<%- unless monitor["
|
65
|
+
<%- unless monitor["tags"].nil? || monitor["tags"].empty? -%>
|
60
66
|
|
61
67
|
tags {
|
62
|
-
<% monitor["
|
63
|
-
"<%= tag.split(":")[0] %>" = "<%= tag.split(":")[1] %>"
|
68
|
+
<% monitor["tags"].each do |tag| -%>
|
69
|
+
"<%= tag.split(":")[0] %>" = "<%= tag.split(":")[1] %>"
|
64
70
|
<%- end -%>
|
65
71
|
}
|
66
72
|
<%- end -%>
|
data/lib/terraformer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraform-exporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacopo Scrinzi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|