aws_cloudformation_helper 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +4 -1
- data/README.md +4 -0
- data/aws_cloudformation_helper.gemspec +2 -2
- data/lib/aws_cloudformation_helper/event.rb +9 -0
- data/lib/aws_cloudformation_helper/response.rb +1 -1
- data/lib/aws_cloudformation_helper/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd3ce1da146dcd54c6a07723f0e5052ee6e7a2629541f045b88aac3d2461527f
|
4
|
+
data.tar.gz: bad68458a88cb436e03fd7db93bcf9d88be648bedfa24729983916db8a5d7744
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72346296e4d2b0d8ae05fce7f8863c687c9b5e206827673f806b12d25e6258a786d74052f67be69271d498fd57ef08b32b26a899793b304b273bfda5222c6189
|
7
|
+
data.tar.gz: e427cbb999dea4d89fb013ac6e9d9cc095b36dc42075828d5b5971f31f14e50bfee1832703cf57fea68d2b56c951b5c2e4aca113134a37d9cf3ff3ec427b6539
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -80,6 +80,10 @@ end
|
|
80
80
|
|
81
81
|
The event data and context object are available from the `@cfn_helper` variable in the main class. Access this data by calling `@cfn_helper.event` and `@cfn_helper.context`.
|
82
82
|
|
83
|
+
Additional response data can also be sent back to CloudFormation stack, ex: `@cfn_helper.event.response_data['Foo']='Bar'`
|
84
|
+
|
85
|
+
Custom `physical_resource_id` can be sent back to CloudFormation stack by calling `@cfn_helper.event.update_physical_resource_id('custom-id') # returns boolean`. Please note, this only works when CloudFormation stack did not provide an id already.
|
86
|
+
|
83
87
|
## Development
|
84
88
|
|
85
89
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
if spec.respond_to?(:metadata)
|
22
22
|
spec.metadata['homepage_uri'] = spec.homepage
|
23
23
|
spec.metadata['source_code_uri'] = 'https://github.com/jeffreycoe/aws_cloudformation_helper'
|
24
|
-
spec.metadata['changelog_uri'] = 'https://github.com/jeffreycoe/aws_cloudformation_helper/CHANGELOG.md'
|
24
|
+
spec.metadata['changelog_uri'] = 'https://github.com/jeffreycoe/aws_cloudformation_helper/blob/master/CHANGELOG.md'
|
25
25
|
end
|
26
26
|
|
27
27
|
# Specify which files should be added to the gem when it is released.
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.require_paths = ['lib']
|
35
35
|
|
36
36
|
spec.add_development_dependency 'bundler'
|
37
|
-
spec.add_development_dependency 'rake'
|
37
|
+
spec.add_development_dependency 'rake', '~> 12.3.3'
|
38
38
|
spec.add_development_dependency 'rspec', '~> 3.2'
|
39
39
|
spec.add_development_dependency 'rubocop', '~> 0.79'
|
40
40
|
end
|
@@ -17,6 +17,7 @@ module AWS
|
|
17
17
|
attr_reader :request_id
|
18
18
|
attr_reader :request_type
|
19
19
|
attr_reader :stack_id
|
20
|
+
attr_accessor :response_data
|
20
21
|
|
21
22
|
def initialize(event, create_method, delete_method, update_method)
|
22
23
|
parse_event_data(event)
|
@@ -25,6 +26,7 @@ module AWS
|
|
25
26
|
@create_method = create_method
|
26
27
|
@delete_method = delete_method
|
27
28
|
@update_method = update_method
|
29
|
+
@response_data = {}
|
28
30
|
end
|
29
31
|
|
30
32
|
def execute
|
@@ -75,6 +77,13 @@ module AWS
|
|
75
77
|
raise e
|
76
78
|
end
|
77
79
|
|
80
|
+
def update_physical_resource_id(physical_resource_id)
|
81
|
+
return false unless @physical_resource_id.to_s.empty?
|
82
|
+
|
83
|
+
@physical_resource_id = physical_resource_id
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
78
87
|
private
|
79
88
|
|
80
89
|
def parse_event_data(event)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_cloudformation_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey Coe
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: '0.79'
|
69
69
|
description: Assists with the development of custom resources for AWS CloudFormation
|
70
70
|
using the Ruby runtime
|
71
|
-
email:
|
71
|
+
email:
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
@@ -95,8 +95,8 @@ licenses:
|
|
95
95
|
metadata:
|
96
96
|
homepage_uri: https://github.com/jeffreycoe/aws_cloudformation_helper
|
97
97
|
source_code_uri: https://github.com/jeffreycoe/aws_cloudformation_helper
|
98
|
-
changelog_uri: https://github.com/jeffreycoe/aws_cloudformation_helper/CHANGELOG.md
|
99
|
-
post_install_message:
|
98
|
+
changelog_uri: https://github.com/jeffreycoe/aws_cloudformation_helper/blob/master/CHANGELOG.md
|
99
|
+
post_install_message:
|
100
100
|
rdoc_options: []
|
101
101
|
require_paths:
|
102
102
|
- lib
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubygems_version: 3.0.6
|
115
|
-
signing_key:
|
115
|
+
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Assists with the development of custom resources for AWS CloudFormation using
|
118
118
|
the Ruby runtime
|