kumogata-template 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/kumogata/template/version.rb +1 -1
- data/template/autoscaling-scheduled-action.rb +12 -11
- data/template/cloudtrail.rb +2 -0
- data/test/template/cloudtrail_test.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d0e2384d5129f591b0991e4093ce0eab6fccf24
|
4
|
+
data.tar.gz: 3130d692f6dcdccc2bebbd9dc59afb17b5934d88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c0fb298d803f7c0e80ac1f2e0e5044a9992a97ac1c918a82629142e12881a2cd7535692459ee037ad33ea92cf1df0160eab544bf32bdd99016ecfecc0ab40ab
|
7
|
+
data.tar.gz: 1fc43065ea09b3043b119d55be332f136733e8e36b4640c92455738cd70d62ee7c356aa2c8c0ef7b52f74e1454da735e0f1adbcbe49b2d32ee5e47aa384fe325
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kumogata-template (0.0.
|
4
|
+
kumogata-template (0.0.22)
|
5
5
|
aws-sdk (~> 2.3)
|
6
6
|
kumogata (= 0.5.12)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
aws-sdk (2.9.
|
12
|
-
aws-sdk-resources (= 2.9.
|
13
|
-
aws-sdk-core (2.9.
|
11
|
+
aws-sdk (2.9.15)
|
12
|
+
aws-sdk-resources (= 2.9.15)
|
13
|
+
aws-sdk-core (2.9.15)
|
14
14
|
aws-sigv4 (~> 1.0)
|
15
15
|
jmespath (~> 1.0)
|
16
|
-
aws-sdk-resources (2.9.
|
17
|
-
aws-sdk-core (= 2.9.
|
16
|
+
aws-sdk-resources (2.9.15)
|
17
|
+
aws-sdk-core (= 2.9.15)
|
18
18
|
aws-sdk-v1 (1.67.0)
|
19
19
|
json (~> 1.4)
|
20
20
|
nokogiri (~> 1)
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
rake (11.3.0)
|
58
58
|
ref (2.0.0)
|
59
59
|
retryable (2.0.4)
|
60
|
-
term-ansicolor (1.
|
60
|
+
term-ansicolor (1.6.0)
|
61
61
|
tins (~> 1.0)
|
62
62
|
therubyracer (0.12.2)
|
63
63
|
libv8 (~> 3.16.14.0)
|
@@ -1 +1 @@
|
|
1
|
-
KUMOGATA_TEMPLATE_VERSION = '0.0.
|
1
|
+
KUMOGATA_TEMPLATE_VERSION = '0.0.22'
|
@@ -19,10 +19,9 @@ max = desired if max < desired
|
|
19
19
|
min = _integer("min", args, -1)
|
20
20
|
min = desired if min < desired
|
21
21
|
|
22
|
-
# 0 - 6 Sunday to Saturday
|
23
22
|
recurrence =
|
24
|
-
if args.key? :
|
25
|
-
case args[:
|
23
|
+
if args.key? :recurrence
|
24
|
+
case args[:recurrence]
|
26
25
|
when "every 5 min"
|
27
26
|
"*/5 * * * *"
|
28
27
|
when "every 30 min"
|
@@ -32,19 +31,21 @@ recurrence =
|
|
32
31
|
when "every day"
|
33
32
|
"0 0 * * *"
|
34
33
|
when "every week"
|
35
|
-
"0 0 * *
|
34
|
+
"0 0 * * Tue"
|
36
35
|
when /\*/
|
37
|
-
args[:
|
36
|
+
args[:recurrence]
|
37
|
+
else
|
38
|
+
_timestamp_utc(args[:recurrence], "cron")
|
38
39
|
end
|
39
|
-
elsif args[:cron_time]
|
40
|
-
_timestamp_utc(args[:cron_time], "cron")
|
41
40
|
else
|
42
41
|
""
|
43
42
|
end
|
44
|
-
start_time =
|
45
|
-
|
46
|
-
|
47
|
-
|
43
|
+
start_time =
|
44
|
+
if args.key? :start_time
|
45
|
+
_timestamp_utc(args[:start_time])
|
46
|
+
else
|
47
|
+
_timestamp_utc(Time.now + 3600)
|
48
|
+
end
|
48
49
|
|
49
50
|
_(name) do
|
50
51
|
Type "AWS::AutoScaling::ScheduledAction"
|
data/template/cloudtrail.rb
CHANGED
@@ -11,6 +11,7 @@ role = _ref_attr_string("role", "Arn", args)
|
|
11
11
|
enable = _bool("enable", args, false)
|
12
12
|
include = _bool("include", args, false)
|
13
13
|
logging = _bool("logging", args, true)
|
14
|
+
multiRegionTrail = _bool("multiRegionTrail", args, false)
|
14
15
|
s3_bucket = _ref_string("s3_bucket", args, "bucket")
|
15
16
|
s3_key = _ref_string("s3_key", args, "key")
|
16
17
|
sns =
|
@@ -30,6 +31,7 @@ _(name) do
|
|
30
31
|
EnableLogFileValidation enable
|
31
32
|
IncludeGlobalServiceEvents include
|
32
33
|
IsLogging logging
|
34
|
+
IsMultiRegionTrail multiRegionTrail
|
33
35
|
#KMSkeyId
|
34
36
|
S3BucketName s3_bucket
|
35
37
|
S3KeyPrefix s3_key unless s3_key.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kumogata-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naoya Nakazawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|