cfnlego 0.0.1 → 0.0.2

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: 0d3071c56e1059f475029b66839b65fd41ad0b7d
4
- data.tar.gz: f33ffc1462b2b3f8036f2a54b89ce93e77cbe8e2
3
+ metadata.gz: f7427acdc109b10d4864de99cb07ec1c4bf88787
4
+ data.tar.gz: 58db6391948e29cd61d98ed4a25966a785537c76
5
5
  SHA512:
6
- metadata.gz: 8ba6291154bedf8a1173feb774fa4b7f0849795f5fe6d668ed6dbb061e4da7a1ba5788927c4dc74a084871c1e0d6ca2aa145b2a74d0f943d5cc424edd9897b1f
7
- data.tar.gz: 5402961bdff6f8f2958624a3791b66cef66d2719c04234011a8bac15a2e3ee9ab1f6dd4a270e550d793f46d7990996ce2a71334844da82160725f5bb29dd0604
6
+ metadata.gz: a8c8ac18474a1a9dc676aed50b696317e9d2e5d1d46b89843de6fa9ef7d603a65b31ce9d5f8383dd092dd8113a33f4480ce0f3f1aacc246177ad715a5bd2096b
7
+ data.tar.gz: e019f44e011cd81ddad36b4fa378c6d66d64e92ed5270f6988460c82c88c25c976409101521b1774c4b9dca439a521b1e596d22bcdd6ed828251f976011ebb61
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  .ruby-gemset
2
+ *.gem
@@ -21,7 +21,7 @@ module Cfnlego
21
21
 
22
22
  # example AutoScaling::AutoScalingGroup
23
23
  def type2file
24
- @file ||= "#{File.dirname(__FILE__)}/resources/#{@type.gsub(/::/, "/")}.yaml"
24
+ @file ||= "#{File.realpath(File.dirname(__FILE__))}/resources/#{@type.gsub(/::/, "/")}.yaml"
25
25
  end
26
26
 
27
27
  def definition
@@ -0,0 +1,21 @@
1
+ AWS::CloudWatch::Alarm:
2
+ Properties:
3
+ ActionsEnabled: "\"true\""
4
+ AlarmActions: ["arn:aws::xxxxx"] # [ Ref("SNS"), Ref("Lambda") ]
5
+ AlarmDescription: "\"it creates noise by save your life\""
6
+ AlarmName: "\"alarm_name\""
7
+ ComparisonOperator: "\"GreaterThanOrEqualToThreshold | GreaterThanThreshold | LessThanThreshold | LessThanOrEqualToThreshold\""
8
+ Dimensions: |
9
+ [{
10
+ "Name" => "AutoScalingGroupName",
11
+ "Value" => "WebServer" # Ref("WebSever")
12
+ }]
13
+ EvaluationPeriods: "\"1\""
14
+ InsufficientDataActions: ["arn:aws::xxxxx"]
15
+ MetricName: "\"CPUUtilization\""
16
+ Namespace: "\"AWS/EC2\""
17
+ OKActions: ["arn:aws::xxxx"]
18
+ Period: "\"60 # multiple of 60\""
19
+ Statistic: "\"SampleCount | Average | Sum | Minimum | Maximumi\""
20
+ Threshold: "\"90\""
21
+ Unit: "\" Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None\""
@@ -0,0 +1,14 @@
1
+ AWS::Lambda::Function:
2
+ Properties:
3
+ Code: |
4
+ {
5
+ "S3Bucket" => "bucket_name",
6
+ "S3Key" => "object name",
7
+ "S3ObjectVersion" => "well, how about use your own versioning to make it more explicit then using s3's versioning for deployment"
8
+ }
9
+ Description: "\"Function description\""
10
+ Handler: "\"index.handler # Entry porint of the lambda function\""
11
+ MemorySize: "\" #in MB, default 128MB\""
12
+ Role: "\"arn:aws:iam:role:xxxx # role that Lambda assumes when it runs your code to access AWS\""
13
+ Runtime: "\"nodejs\""
14
+ Timeout: "\"30 #The function execution time (in seconds) after which Lambda terminates the function. default is 3\""
@@ -1,3 +1,3 @@
1
1
  module Cfnlego
2
- VERSION='0.0.1'
2
+ VERSION='0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfnlego
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Yung
@@ -77,8 +77,10 @@ files:
77
77
  - lib/cfnlego/resources/AutoScaling/AutoScalingGroup.yaml
78
78
  - lib/cfnlego/resources/AutoScaling/LaunchConfiguration.yaml
79
79
  - lib/cfnlego/resources/AutoScaling/LifecycleHook.yaml
80
+ - lib/cfnlego/resources/CloudWatch/Alarm.yaml
80
81
  - lib/cfnlego/resources/IAM/InstanceProfile.yaml
81
82
  - lib/cfnlego/resources/IAM/Role.yaml
83
+ - lib/cfnlego/resources/Lambda/Function.yaml
82
84
  - lib/cfnlego/version.rb
83
85
  homepage: https://github.com/allinwonder/cfnlego
84
86
  licenses: