cfnlego 0.0.6 → 0.0.8

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: 3ba0d4884e48b1e336e94f1ca750f1b06b39ec4d
4
- data.tar.gz: 3fc1e970ef70a48ff862f8d631b2c366fe810448
3
+ metadata.gz: 87083f3258efe9267b25f869a7aa7390be8c3840
4
+ data.tar.gz: 4db55fe2c94d0a4ca4d34de812ff8e890863714b
5
5
  SHA512:
6
- metadata.gz: 373361a8e6bc7cb6e27aadcd02b8829f2d5b6061f295d792fec613a405192287243482091db85e5ea9f3006410dab93e505c1f2bbfacb459fa9c929cb46c685f
7
- data.tar.gz: 2cea0934b9a8c13c347db9deed8b95050c72d812a2e35d66f1f5401bc8956ef846013165e02f4dbe348f858d509d5f6733a43af1c4f56d2b5d6567f8d4701df6
6
+ metadata.gz: 0bd78b7fc97943aed96984043e4b8b07f5bc6dba09007fd1464edaad1d533e9078e06880aa0349595ed71fe1a0365ba8ae0997f74cc4caaa95b6bc637cbdcaf1
7
+ data.tar.gz: d76dc42455702dd36b3fbaf4405157b8ba080fd0f270e2849a20ccaac7d8714167509365c2ee1fd90894a288683cb3b9f5afa604f24af83a61d450e063d7da79
data/.codeclimate.yml ADDED
@@ -0,0 +1,2 @@
1
+ languages:
2
+ Ruby: true
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- cfndsl (0.2.2)
4
+ cfndsl (0.2.3)
5
5
  coderay (1.1.0)
6
6
  diff-lcs (1.2.5)
7
7
  ffi (1.9.10)
@@ -34,7 +34,7 @@ GEM
34
34
  method_source (~> 0.8.1)
35
35
  slop (~> 3.4)
36
36
  rake (10.4.2)
37
- rb-fsevent (0.9.5)
37
+ rb-fsevent (0.9.6)
38
38
  rb-inotify (0.9.5)
39
39
  ffi (>= 0.5.0)
40
40
  rspec (3.3.0)
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  cfnlego
2
2
  ========
3
3
 
4
- [![Build Status](https://travis-ci.org/allinwonder/cfnlego.svg)](https://travis-ci.org/allinwonder/cfnlego)
4
+ [![Build Status](https://travis-ci.org/allinwonder/cfnlego.svg)](https://travis-ci.org/allinwonder/cfnlego) [![Gem Version](https://badge.fury.io/rb/cfnlego.svg)](http://badge.fury.io/rb/cfnlego) [![Code Climate](https://codeclimate.com/github/allinwonder/cfnlego/badges/gpa.svg)](https://codeclimate.com/github/allinwonder/cfnlego)
5
5
 
6
6
  ### Description
7
7
 
8
8
  cfnlego is built to quickly bootstrap CloudFormation development with cfndsl.
9
9
 
10
- It provides templates for eventurally all (WIP) AWS Resources and simply bake them into a template
10
+ It provides templates for all (WIP) AWS Resources and simply bake them into a template
11
11
 
12
12
  ### How to use
13
13
 
@@ -32,17 +32,19 @@ Example:
32
32
 
33
33
  ### Current Supported Resources
34
34
 
35
- - AWS::AutoScaling::AutoScalingGroup
36
- - AWS::AutoScaling::LaunchConfiguration
37
- - AWS::AutoScaling::LifecycleHook
38
- - AWS::CloudWatch::Alarm
39
- - AWS::ElasticLoadBalancing::LoadBalancer
40
- - AWS::IAM::InstanceProfile
41
- - AWS::IAM::ManagedPolicy
42
- - AWS::IAM::Role
43
- - AWS::Lambda::Function
44
- - AWS::SNS::Topic
45
- - AWS::SNS::TopicPolicy
35
+ - AWS::AutoScaling::AutoScalingGroup
36
+ - AWS::AutoScaling::LaunchConfiguration
37
+ - AWS::AutoScaling::LifecycleHook
38
+ - AWS::CloudFront::Distribution
39
+ - AWS::CloudWatch::Alarm
40
+ - AWS::ElasticLoadBalancing::LoadBalancer
41
+ - AWS::IAM::InstanceProfile
42
+ - AWS::IAM::ManagedPolicy
43
+ - AWS::IAM::Role
44
+ - AWS::Lambda::Function
45
+ - AWS::Route53::RecordSet
46
+ - AWS::SNS::Topic
47
+ - AWS::SNS::TopicPolicy
46
48
 
47
49
  ### License
48
50
 
data/Rakefile CHANGED
@@ -5,6 +5,10 @@ namespace :cfnlego do
5
5
 
6
6
  task :install do
7
7
  end
8
+
9
+ task :supported_resources do
10
+ `cd lib/cfnlego/resources/ && find . | grep -v '^.$'| sed -e "s/^\.\///" | grep '/' | sed 's/\//::/g' | sed 's/\.yaml//' | sed 's/^/AWS::/g'`
11
+ end
8
12
  end
9
13
 
10
14
  require 'rspec/core/rake_task'
data/cfnlego.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = "bin"
21
21
  spec.executables << "cfnlego"
22
22
 
23
+ spec.add_runtime_dependency "ruby-beautify", "~> 0.97"
23
24
  spec.add_development_dependency "bundler", "~> 1.9"
24
25
  spec.add_development_dependency "rake", "~> 10.0"
25
26
  spec.add_development_dependency "cfndsl", "~> 0.2"
@@ -0,0 +1,87 @@
1
+ AWS::CloudFront::Distribution:
2
+ Properties:
3
+ DistributionConfig: |
4
+ {
5
+ "Aliases" => ["CNAMEs (alternate domain names), if any, for the distribution"],
6
+ "CacheBehaviors" => [
7
+ {
8
+ "AllowedMethods" => ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"], # default ["HEAD", "GET"]
9
+ "CachedMethods" => ["GET", "HEAD", "OPTIONS"], # default ["HEAD", "GET"]
10
+ "ForwardedValues" => {
11
+ "Cookies" => {
12
+ "Forward" => "\"none, all, or whitelist\"",
13
+ "WhitelistedNames" => ["The names of cookies to forward to the origin for the cache behavior."]
14
+ },
15
+ "Headers" => ["(whitelisted headers)", "If you specify a single asterisk *, all headers are forwarded"],
16
+ "QueryString" => false # Indicates whether you want CloudFront to forward query strings to the origin, Required: Yes
17
+ },
18
+ "MinTTL" => "\"The minimum amount of time that you want objects to stay in the cache\"",
19
+ "PathPattern" => "\"The pattern to which this cache behavior applies. For example, you can specify images/*.jpg.\"",
20
+ "SmoothStreaming" => "\"distribute media files in the Microsoft Smooth Streaming format\"",
21
+ "TargetOriginId" => "\"The ID value of the origin to which you want CloudFront to route requests\"",
22
+ "TrustedSigners" => ["A list of AWS accounts that can create signed URLs in order to access private content."],
23
+ "ViewerProtocolPolicy" => "\"The protocol that users can use to access the files\""
24
+ }
25
+ ],
26
+ "Comment" => "\"Comment\"",
27
+ "CustomErrorResponses" => [
28
+ {
29
+ "ErrorCachingMinTTL" => 300, #The default value is 300.
30
+ "ErrorCode" => 500, # 400, 403, 404, 405, 414, 500, 501, 502, 503, or 504
31
+ "ResponseCode" => 500, # 200, 400, 403, 404, 405, 414, 500, 501, 502, 503, or 504.
32
+ "ResponsePagePath" => "\"The path to the custom error page\""
33
+ }
34
+ ],
35
+ "DefaultCacheBehavior" => {
36
+ "AllowedMethods" => ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"], # default ["HEAD", "GET"]
37
+ "CachedMethods" => ["GET", "HEAD", "OPTIONS"], # default ["HEAD", "GET"].
38
+ "ForwardedValues" => {
39
+ "Cookies" => {
40
+ "Forward" => "\"none, all, or whitelist\"",
41
+ "WhitelistedNames" => ["The names of cookies to forward to the origin for the cache behavior."]
42
+ },
43
+ "Headers" => ["(whitelisted headers)", "If you specify a single asterisk *, all headers are forwarded"],
44
+ "QueryString" => false # Indicates whether you want CloudFront to forward query strings to the origin, Required: Yes
45
+ },
46
+ "MinTTL" => "\"The minimum amount of time that you want objects to stay in the cache\"",
47
+ "SmoothStreaming" => "\"distribute media files in the Microsoft Smooth Streaming format\"",
48
+ "TargetOriginId" => "\"The ID value of the origin to which you want CloudFront to route requests\"",
49
+ "TrustedSigners" => ["A list of AWS accounts that can create signed URLs in order to access private content."],
50
+ "ViewerProtocolPolicy" => "\"allow-all | redirect-to-https | https-only\""
51
+ },
52
+ "DefaultRootObject" => "\"The object (such as index.html) that you want CloudFront to request from your origin when the root URL\"",
53
+ "Enabled" => true,
54
+ "Logging" => {
55
+ "Bucket" => "\"s3bucket\"",
56
+ "IncludeCookies" => true,
57
+ "Prefix" => "\"/prefix\""
58
+ },
59
+ "Origins" => [
60
+ {
61
+ "CustomOriginConfig" => {
62
+ "HTTPPort" => "\"80\"",
63
+ "HTTPSPort" => "\"443\"",
64
+ "OriginProtocolPolicy" => "\"http-only | match-viewer\""
65
+ },
66
+ "DomainName" => "\"The DNS name of the Amazon Simple Storage Service (S3) bucket or the HTTP server\"",
67
+ "Id" => "\"An identifier for the origin\"",
68
+ "OriginPath" => "\The path that CloudFront uses to request content from an S3 bucket or custom origin. The combination of the DomainName and OriginPath properties must resolve to a valid path. The value must start with a slash mark (/) and cannot end with a slash mark.\"",
69
+ "S3OriginConfig" => {
70
+ "OriginAccessIdentity" => "\"origin-access-identity/cloudfront/ID-of-origin-access-identity\""
71
+ }
72
+ }
73
+ ],
74
+ "PriceClass" => "PriceClass_All | PriceClass_200 | PriceClass_100",
75
+ "Restrictions" => {
76
+ "GeoRestriction" => {
77
+ "Locations" => ["The two-letter, uppercase country code for a country that you want to include in your blacklist or whitelist."],
78
+ "RestrictionType" => "\"blacklist | whitelist | none\""
79
+ }
80
+ },
81
+ "ViewerCertificate" => {
82
+ "CloudFrontDefaultCertificate" => true,
83
+ "IamCertificateId" => "\"The IAM certificate ID to use if you're using an alternate domain name, Path MUST starts with /cloudfront/",
84
+ "MinimumProtocolVersion" => "\"If you specify the IamCertificateId property and specify SNI only for the SslSupportMethod property, you must use TLSv1 for the minimum protocol version. If you don't specify a value, AWS CloudFormation specifies SSLv3.\"",
85
+ "SslSupportMethod" => "\"vip | sni-only\""
86
+ }
87
+ }
@@ -0,0 +1,27 @@
1
+ AWS::Route53::RecordSet:
2
+ Properties:
3
+ AliasTarget: |
4
+ {
5
+ "DNSName" => "The DNS name of the load balancer, the domain name of the CloudFront distribution, or the website endpoint of the Amazon S3 bucket",
6
+ "EvaluateTargetHealth" => true,
7
+ "HostedZoneId" => "For CloudFront, use Z2FDTNDATAQYW2 http://docs.aws.amazon.com/Route53/latest/APIReference/CreateAliasRRSAPI.html"
8
+ }
9
+ Comment: "\"Comment\""
10
+ Failover: "\"PRIMARY | SECONDARY\""
11
+ GeoLocation: |
12
+ {
13
+ "ContinentCode" => "AF, AN, AS, EU, OC, NA, SA",
14
+ "CountryCode" => "http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets_Requests.html#change-rrsets-request-continent-code",
15
+ "SubdivisionCode" => "http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets_Requests.html#change-rrsets-request-subdivision-code"
16
+ }
17
+ HealthCheckId: "\"The health check ID\""
18
+ HostedZoneId: "\"The ID of the hosted zone\""
19
+ HostedZoneName: "\"You must specify either the HostedZoneName or HostedZoneId, but you cannot specify both.\""
20
+ Name: "\"The name of the domain. ends with a period as the last label indication\""
21
+ Region: "\"Latency resource record sets only: The Amazon EC2 region where the resource that is specified in this resource record set resides.\""
22
+ ResourceRecords: |
23
+ ["List of resource records to add.", " if you set ResourceRecords, you must set TTL or SetIdentifier."]
24
+ SetIdentifier: "\"A unique identifier that differentiates among multiple resource record sets that have the same combination of DNS name and type.\""
25
+ TTL: "\"The resource record cache time to live (TTL), in seconds.\""
26
+ Type: "\"A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT\""
27
+ Weight: "\"Weighted resource record sets only: Weight expects integer values\""
@@ -1,3 +1,3 @@
1
1
  module Cfnlego
2
- VERSION='0.0.6'
2
+ VERSION='0.0.8'
3
3
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfnlego
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Yung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-02 00:00:00.000000000 Z
11
+ date: 2015-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby-beautify
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.97'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.97'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -60,6 +74,7 @@ executables:
60
74
  extensions: []
61
75
  extra_rdoc_files: []
62
76
  files:
77
+ - ".codeclimate.yml"
63
78
  - ".gitignore"
64
79
  - ".ruby-version"
65
80
  - ".travis.yml"
@@ -77,12 +92,14 @@ files:
77
92
  - lib/cfnlego/resources/AutoScaling/AutoScalingGroup.yaml
78
93
  - lib/cfnlego/resources/AutoScaling/LaunchConfiguration.yaml
79
94
  - lib/cfnlego/resources/AutoScaling/LifecycleHook.yaml
95
+ - lib/cfnlego/resources/CloudFront/Distribution.yaml
80
96
  - lib/cfnlego/resources/CloudWatch/Alarm.yaml
81
97
  - lib/cfnlego/resources/ElasticLoadBalancing/LoadBalancer.yaml
82
98
  - lib/cfnlego/resources/IAM/InstanceProfile.yaml
83
99
  - lib/cfnlego/resources/IAM/ManagedPolicy.yaml
84
100
  - lib/cfnlego/resources/IAM/Role.yaml
85
101
  - lib/cfnlego/resources/Lambda/Function.yaml
102
+ - lib/cfnlego/resources/Route53/RecordSet.yaml
86
103
  - lib/cfnlego/resources/SNS/Topic.yaml
87
104
  - lib/cfnlego/resources/SNS/TopicPolicy.yaml
88
105
  - lib/cfnlego/version.rb