stack_master 2.3.0 → 2.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +22 -0
- data/README.md +100 -23
- data/lib/stack_master/aws_driver/cloud_formation.rb +5 -2
- data/lib/stack_master/aws_driver/s3.rb +5 -5
- data/lib/stack_master/change_set.rb +5 -5
- data/lib/stack_master/cli.rb +49 -15
- data/lib/stack_master/cloudformation_interpolating_eruby.rb +57 -0
- data/lib/stack_master/cloudformation_template_eruby.rb +32 -0
- data/lib/stack_master/commands/apply.rb +2 -14
- data/lib/stack_master/commands/compile.rb +1 -1
- data/lib/stack_master/commands/drift.rb +118 -0
- data/lib/stack_master/commands/init.rb +1 -1
- data/lib/stack_master/commands/nag.rb +30 -0
- data/lib/stack_master/commands/resources.rb +1 -1
- data/lib/stack_master/commands/status.rb +1 -1
- data/lib/stack_master/commands/tidy.rb +1 -1
- data/lib/stack_master/commands/validate.rb +1 -1
- data/lib/stack_master/config.rb +9 -1
- data/lib/stack_master/diff.rb +45 -0
- data/lib/stack_master/identity.rb +37 -5
- data/lib/stack_master/parameter_loader.rb +4 -5
- data/lib/stack_master/parameter_resolvers/acm_certificate.rb +2 -2
- data/lib/stack_master/parameter_resolvers/ami_finder.rb +3 -3
- data/lib/stack_master/parameter_resolvers/latest_container.rb +1 -1
- data/lib/stack_master/parameter_resolvers/parameter_store.rb +3 -3
- data/lib/stack_master/parameter_resolvers/stack_output.rb +1 -1
- data/lib/stack_master/parameter_validator.rb +53 -0
- data/lib/stack_master/role_assumer.rb +3 -2
- data/lib/stack_master/security_group_finder.rb +1 -1
- data/lib/stack_master/sns_topic_finder.rb +1 -1
- data/lib/stack_master/sparkle_formation/compile_time/empty_validator.rb +1 -1
- data/lib/stack_master/sparkle_formation/template_file.rb +2 -50
- data/lib/stack_master/stack.rb +23 -10
- data/lib/stack_master/stack_definition.rb +27 -10
- data/lib/stack_master/stack_differ.rb +15 -39
- data/lib/stack_master/stack_events/presenter.rb +1 -1
- data/lib/stack_master/template_compilers/cfndsl.rb +3 -2
- data/lib/stack_master/template_compilers/sparkle_formation.rb +1 -1
- data/lib/stack_master/template_compilers/yaml_erb.rb +19 -0
- data/lib/stack_master/template_utils.rb +9 -3
- data/lib/stack_master/validator.rb +25 -8
- data/lib/stack_master/version.rb +1 -1
- data/lib/stack_master.rb +23 -2
- metadata +73 -17
data/lib/stack_master/stack.rb
CHANGED
@@ -27,23 +27,17 @@ module StackMaster
|
|
27
27
|
template_default_parameters.merge(parameters)
|
28
28
|
end
|
29
29
|
|
30
|
-
def missing_parameters?
|
31
|
-
parameters_with_defaults.any? do |key, value|
|
32
|
-
value == nil
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
30
|
def self.find(region, stack_name)
|
37
31
|
cf = StackMaster.cloud_formation_driver
|
38
|
-
cf_stack = cf.describe_stacks(stack_name: stack_name).stacks.first
|
32
|
+
cf_stack = cf.describe_stacks({ stack_name: stack_name }).stacks.first
|
39
33
|
return unless cf_stack
|
40
34
|
parameters = cf_stack.parameters.inject({}) do |params_hash, param_struct|
|
41
35
|
params_hash[param_struct.parameter_key] = param_struct.parameter_value
|
42
36
|
params_hash
|
43
37
|
end
|
44
|
-
template_body ||= cf.get_template(stack_name: stack_name, template_stage: 'Original').template_body
|
38
|
+
template_body ||= cf.get_template({ stack_name: stack_name, template_stage: 'Original' }).template_body
|
45
39
|
template_format = TemplateUtils.identify_template_format(template_body)
|
46
|
-
stack_policy_body ||= cf.get_stack_policy(stack_name: stack_name).stack_policy_body
|
40
|
+
stack_policy_body ||= cf.get_stack_policy({ stack_name: stack_name }).stack_policy_body
|
47
41
|
outputs = cf_stack.outputs
|
48
42
|
|
49
43
|
new(region: region,
|
@@ -62,7 +56,7 @@ module StackMaster
|
|
62
56
|
end
|
63
57
|
|
64
58
|
def self.generate(stack_definition, config)
|
65
|
-
parameter_hash = ParameterLoader.load(stack_definition.
|
59
|
+
parameter_hash = ParameterLoader.load(parameter_files: stack_definition.all_parameter_files, parameters: stack_definition.parameters)
|
66
60
|
template_parameters = ParameterResolver.resolve(config, stack_definition, parameter_hash[:template_parameters])
|
67
61
|
compile_time_parameters = ParameterResolver.resolve(config, stack_definition, parameter_hash[:compile_time_parameters])
|
68
62
|
template_body = TemplateCompiler.compile(config, stack_definition.compiler, stack_definition.template_dir, stack_definition.template, compile_time_parameters, stack_definition.compiler_options)
|
@@ -81,6 +75,25 @@ module StackMaster
|
|
81
75
|
stack_policy_body: stack_policy_body)
|
82
76
|
end
|
83
77
|
|
78
|
+
def self.generate_without_parameters(stack_definition, config)
|
79
|
+
parameter_hash = ParameterLoader.load(parameter_files: stack_definition.all_parameter_files, parameters: stack_definition.parameters)
|
80
|
+
compile_time_parameters = ParameterResolver.resolve(config, stack_definition, parameter_hash[:compile_time_parameters])
|
81
|
+
template_body = TemplateCompiler.compile(config, stack_definition.compiler, stack_definition.template_dir, stack_definition.template, compile_time_parameters, stack_definition.compiler_options)
|
82
|
+
template_format = TemplateUtils.identify_template_format(template_body)
|
83
|
+
stack_policy_body = if stack_definition.stack_policy_file_path
|
84
|
+
File.read(stack_definition.stack_policy_file_path)
|
85
|
+
end
|
86
|
+
new(region: stack_definition.region,
|
87
|
+
stack_name: stack_definition.stack_name,
|
88
|
+
tags: stack_definition.tags,
|
89
|
+
parameters: {},
|
90
|
+
template_body: template_body,
|
91
|
+
template_format: template_format,
|
92
|
+
role_arn: stack_definition.role_arn,
|
93
|
+
notification_arns: stack_definition.notification_arns,
|
94
|
+
stack_policy_body: stack_policy_body)
|
95
|
+
end
|
96
|
+
|
84
97
|
def max_template_size(use_s3)
|
85
98
|
return TemplateUtils::MAX_S3_TEMPLATE_SIZE if use_s3
|
86
99
|
TemplateUtils::MAX_TEMPLATE_SIZE
|
@@ -16,7 +16,10 @@ module StackMaster
|
|
16
16
|
:additional_parameter_lookup_dirs,
|
17
17
|
:s3,
|
18
18
|
:files,
|
19
|
-
:compiler_options
|
19
|
+
:compiler_options,
|
20
|
+
:parameters_dir,
|
21
|
+
:parameters,
|
22
|
+
:parameter_files
|
20
23
|
|
21
24
|
attr_reader :compiler
|
22
25
|
|
@@ -32,8 +35,12 @@ module StackMaster
|
|
32
35
|
@compiler = nil
|
33
36
|
super
|
34
37
|
@additional_parameter_lookup_dirs ||= []
|
38
|
+
@base_dir ||= ""
|
35
39
|
@template_dir ||= File.join(@base_dir, 'templates')
|
40
|
+
@parameters_dir ||= File.join(@base_dir, 'parameters')
|
36
41
|
@allowed_accounts = Array(@allowed_accounts)
|
42
|
+
@parameters ||= {}
|
43
|
+
@parameter_files ||= []
|
37
44
|
end
|
38
45
|
|
39
46
|
def ==(other)
|
@@ -56,13 +63,9 @@ module StackMaster
|
|
56
63
|
@compiler_options == other.compiler_options
|
57
64
|
end
|
58
65
|
|
59
|
-
def compiler=(compiler)
|
60
|
-
@compiler = compiler.&to_sym
|
61
|
-
end
|
62
|
-
|
63
66
|
def template_file_path
|
64
67
|
return unless template
|
65
|
-
File.expand_path(
|
68
|
+
File.expand_path(template, template_dir)
|
66
69
|
end
|
67
70
|
|
68
71
|
def files_dir
|
@@ -85,7 +88,15 @@ module StackMaster
|
|
85
88
|
Utils.change_extension(template, 'json')
|
86
89
|
end
|
87
90
|
|
88
|
-
def
|
91
|
+
def all_parameter_files
|
92
|
+
if parameter_files.empty?
|
93
|
+
parameter_files_from_globs
|
94
|
+
else
|
95
|
+
parameter_files
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def parameter_files_from_globs
|
89
100
|
parameter_file_globs.map(&Dir.method(:glob)).flatten
|
90
101
|
end
|
91
102
|
|
@@ -101,20 +112,26 @@ module StackMaster
|
|
101
112
|
!s3.nil?
|
102
113
|
end
|
103
114
|
|
115
|
+
def parameter_files
|
116
|
+
Array(@parameter_files).map do |file|
|
117
|
+
File.expand_path(file, parameters_dir)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
104
121
|
private
|
105
122
|
|
106
123
|
def additional_parameter_lookup_globs
|
107
124
|
additional_parameter_lookup_dirs.map do |a|
|
108
|
-
File.join(
|
125
|
+
File.join(parameters_dir, a, "#{stack_name_glob}.y*ml")
|
109
126
|
end
|
110
127
|
end
|
111
128
|
|
112
129
|
def region_parameter_glob
|
113
|
-
File.join(
|
130
|
+
File.join(parameters_dir, "#{region}", "#{stack_name_glob}.y*ml")
|
114
131
|
end
|
115
132
|
|
116
133
|
def default_parameter_glob
|
117
|
-
File.join(
|
134
|
+
File.join(parameters_dir, "#{stack_name_glob}.y*ml")
|
118
135
|
end
|
119
136
|
|
120
137
|
def stack_name_glob
|
@@ -10,13 +10,13 @@ module StackMaster
|
|
10
10
|
|
11
11
|
def proposed_template
|
12
12
|
return @proposed_stack.template_body unless @proposed_stack.template_format == :json
|
13
|
-
JSON.pretty_generate(JSON.parse(@proposed_stack.template_body))
|
13
|
+
JSON.pretty_generate(JSON.parse(@proposed_stack.template_body)) + "\n"
|
14
14
|
end
|
15
15
|
|
16
16
|
def current_template
|
17
17
|
return '' unless @current_stack
|
18
18
|
return @current_stack.template_body unless @current_stack.template_format == :json
|
19
|
-
JSON.pretty_generate(TemplateUtils.template_hash(@current_stack.template_body))
|
19
|
+
JSON.pretty_generate(TemplateUtils.template_hash(@current_stack.template_body)) + "\n"
|
20
20
|
end
|
21
21
|
|
22
22
|
def current_parameters
|
@@ -39,24 +39,30 @@ module StackMaster
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def body_different?
|
42
|
-
body_diff
|
42
|
+
body_diff.different?
|
43
43
|
end
|
44
44
|
|
45
45
|
def body_diff
|
46
|
-
@body_diff ||=
|
46
|
+
@body_diff ||= Diff.new(name: 'Stack',
|
47
|
+
before: current_template,
|
48
|
+
after: proposed_template,
|
49
|
+
context: 7)
|
47
50
|
end
|
48
51
|
|
49
52
|
def params_different?
|
50
|
-
|
53
|
+
parameters_diff.different?
|
51
54
|
end
|
52
55
|
|
53
|
-
def
|
54
|
-
@param_diff ||=
|
56
|
+
def parameters_diff
|
57
|
+
@param_diff ||= Diff.new(name: 'Parameters',
|
58
|
+
before: current_parameters,
|
59
|
+
after: proposed_parameters)
|
55
60
|
end
|
56
61
|
|
57
62
|
def output_diff
|
58
|
-
|
59
|
-
|
63
|
+
body_diff.display
|
64
|
+
parameters_diff.display
|
65
|
+
|
60
66
|
unless noecho_keys.empty?
|
61
67
|
StackMaster.stdout.puts " * can not tell if NoEcho parameters are different."
|
62
68
|
end
|
@@ -83,38 +89,8 @@ module StackMaster
|
|
83
89
|
|
84
90
|
private
|
85
91
|
|
86
|
-
def display_diff(thing, diff)
|
87
|
-
StackMaster.stdout.print "#{thing} diff: "
|
88
|
-
if diff == ''
|
89
|
-
StackMaster.stdout.puts "No changes"
|
90
|
-
else
|
91
|
-
StackMaster.stdout.puts
|
92
|
-
diff.each_line do |line|
|
93
|
-
if line.start_with?('+')
|
94
|
-
StackMaster.stdout.print colorize(line, :green)
|
95
|
-
elsif line.start_with?('-')
|
96
|
-
StackMaster.stdout.print colorize(line, :red)
|
97
|
-
else
|
98
|
-
StackMaster.stdout.print line
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
92
|
def sort_params(hash)
|
105
93
|
hash.sort.to_h
|
106
94
|
end
|
107
|
-
|
108
|
-
def colorize(text, color)
|
109
|
-
if colorize?
|
110
|
-
text.colorize(color)
|
111
|
-
else
|
112
|
-
text
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
def colorize?
|
117
|
-
ENV.fetch('COLORIZE') { 'true' } == 'true'
|
118
|
-
end
|
119
95
|
end
|
120
96
|
end
|
@@ -10,7 +10,7 @@ module StackMaster
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def print_event(event)
|
13
|
-
@io.puts "#{event.timestamp.localtime} #{event.logical_resource_id} #{event.resource_type} #{event.resource_status} #{event.resource_status_reason}".
|
13
|
+
@io.puts Rainbow("#{event.timestamp.localtime} #{event.logical_resource_id} #{event.resource_type} #{event.resource_status} #{event.resource_status_reason}").color(event_colour(event))
|
14
14
|
end
|
15
15
|
|
16
16
|
def event_colour(event)
|
@@ -2,14 +2,15 @@ module StackMaster::TemplateCompilers
|
|
2
2
|
class Cfndsl
|
3
3
|
def self.require_dependencies
|
4
4
|
require 'cfndsl'
|
5
|
+
require 'json'
|
5
6
|
end
|
6
7
|
|
7
8
|
def self.compile(template_dir, template, compile_time_parameters, _compiler_options = {})
|
8
|
-
CfnDsl.disable_binding
|
9
9
|
CfnDsl::ExternalParameters.defaults.clear # Ensure there's no leakage across invocations
|
10
10
|
CfnDsl::ExternalParameters.defaults(compile_time_parameters.symbolize_keys)
|
11
11
|
template_file_path = File.join(template_dir, template)
|
12
|
-
::CfnDsl.eval_file_with_extras(template_file_path).
|
12
|
+
json_hash = ::CfnDsl.eval_file_with_extras(template_file_path).as_json
|
13
|
+
JSON.pretty_generate(json_hash)
|
13
14
|
end
|
14
15
|
|
15
16
|
StackMaster::TemplateCompiler.register(:cfndsl, self)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module StackMaster::TemplateCompilers
|
4
|
+
class YamlErb
|
5
|
+
def self.require_dependencies
|
6
|
+
require 'yaml'
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.compile(template_dir, template, compile_time_parameters, _compiler_options = {})
|
10
|
+
template_file_path = File.join(template_dir, template)
|
11
|
+
template = StackMaster::CloudFormationTemplateEruby.new(File.read(template_file_path))
|
12
|
+
template.filename = template_file_path
|
13
|
+
|
14
|
+
template.result(params: compile_time_parameters)
|
15
|
+
end
|
16
|
+
|
17
|
+
StackMaster::TemplateCompiler.register(:yaml_erb, self)
|
18
|
+
end
|
19
|
+
end
|
@@ -2,12 +2,18 @@ module StackMaster
|
|
2
2
|
module TemplateUtils
|
3
3
|
MAX_TEMPLATE_SIZE = 51200
|
4
4
|
MAX_S3_TEMPLATE_SIZE = 460800
|
5
|
+
# Matches if the first non-whitespace character is a '{', handling cases
|
6
|
+
# with leading whitespace and extra (whitespace-only) lines.
|
7
|
+
JSON_IDENTIFICATION_PATTERN = Regexp.new('\A\s*{', Regexp::MULTILINE)
|
5
8
|
|
6
9
|
extend self
|
7
10
|
|
8
11
|
def identify_template_format(template_body)
|
9
|
-
|
10
|
-
|
12
|
+
if template_body =~ JSON_IDENTIFICATION_PATTERN
|
13
|
+
:json
|
14
|
+
else
|
15
|
+
:yaml
|
16
|
+
end
|
11
17
|
end
|
12
18
|
|
13
19
|
def template_hash(template_body=nil)
|
@@ -28,4 +34,4 @@ module StackMaster
|
|
28
34
|
JSON.dump(template_hash(template_body))
|
29
35
|
end
|
30
36
|
end
|
31
|
-
end
|
37
|
+
end
|
@@ -1,21 +1,22 @@
|
|
1
1
|
module StackMaster
|
2
2
|
class Validator
|
3
|
-
def self.valid?(stack_definition, config)
|
4
|
-
new(stack_definition, config).perform
|
3
|
+
def self.valid?(stack_definition, config, options)
|
4
|
+
new(stack_definition, config, options).perform
|
5
5
|
end
|
6
6
|
|
7
|
-
def initialize(stack_definition, config)
|
7
|
+
def initialize(stack_definition, config, options)
|
8
8
|
@stack_definition = stack_definition
|
9
9
|
@config = config
|
10
|
+
@options = options
|
10
11
|
end
|
11
12
|
|
12
13
|
def perform
|
13
|
-
parameter_hash = ParameterLoader.load(@stack_definition.parameter_files)
|
14
|
-
compile_time_parameters = ParameterResolver.resolve(@config, @stack_definition, parameter_hash[:compile_time_parameters])
|
15
|
-
|
16
14
|
StackMaster.stdout.print "#{@stack_definition.stack_name}: "
|
17
|
-
|
18
|
-
|
15
|
+
if validate_template_parameters? && parameter_validator.missing_parameters?
|
16
|
+
StackMaster.stdout.puts "invalid\n#{parameter_validator.error_message}"
|
17
|
+
return false
|
18
|
+
end
|
19
|
+
cf.validate_template(template_body: TemplateUtils.maybe_compressed_template_body(stack.template_body))
|
19
20
|
StackMaster.stdout.puts "valid"
|
20
21
|
true
|
21
22
|
rescue Aws::CloudFormation::Errors::ValidationError => e
|
@@ -25,8 +26,24 @@ module StackMaster
|
|
25
26
|
|
26
27
|
private
|
27
28
|
|
29
|
+
def validate_template_parameters?
|
30
|
+
@options.validate_template_parameters
|
31
|
+
end
|
32
|
+
|
28
33
|
def cf
|
29
34
|
@cf ||= StackMaster.cloud_formation_driver
|
30
35
|
end
|
36
|
+
|
37
|
+
def stack
|
38
|
+
@stack ||= if validate_template_parameters?
|
39
|
+
Stack.generate(@stack_definition, @config)
|
40
|
+
else
|
41
|
+
Stack.generate_without_parameters(@stack_definition, @config)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def parameter_validator
|
46
|
+
@parameter_validator ||= ParameterValidator.new(stack: stack, stack_definition: @stack_definition)
|
47
|
+
end
|
31
48
|
end
|
32
49
|
end
|
data/lib/stack_master/version.rb
CHANGED
data/lib/stack_master.rb
CHANGED
@@ -7,7 +7,9 @@ require 'aws-sdk-ecr'
|
|
7
7
|
require 'aws-sdk-s3'
|
8
8
|
require 'aws-sdk-sns'
|
9
9
|
require 'aws-sdk-ssm'
|
10
|
-
require '
|
10
|
+
require 'aws-sdk-iam'
|
11
|
+
require 'rainbow'
|
12
|
+
require 'active_support'
|
11
13
|
require 'active_support/core_ext/hash/keys'
|
12
14
|
require 'active_support/core_ext/object/blank'
|
13
15
|
require 'active_support/core_ext/string/inflections'
|
@@ -23,6 +25,7 @@ module StackMaster
|
|
23
25
|
autoload :CLI, 'stack_master/cli'
|
24
26
|
autoload :CtrlC, 'stack_master/ctrl_c'
|
25
27
|
autoload :Command, 'stack_master/command'
|
28
|
+
autoload :Diff, 'stack_master/diff'
|
26
29
|
autoload :VERSION, 'stack_master/version'
|
27
30
|
autoload :Stack, 'stack_master/stack'
|
28
31
|
autoload :Prompter, 'stack_master/prompter'
|
@@ -42,18 +45,23 @@ module StackMaster
|
|
42
45
|
autoload :StackDefinition, 'stack_master/stack_definition'
|
43
46
|
autoload :TemplateCompiler, 'stack_master/template_compiler'
|
44
47
|
autoload :Identity, 'stack_master/identity'
|
48
|
+
autoload :CloudFormationInterpolatingEruby, 'stack_master/cloudformation_interpolating_eruby'
|
49
|
+
autoload :CloudFormationTemplateEruby, 'stack_master/cloudformation_template_eruby'
|
45
50
|
|
46
51
|
autoload :StackDiffer, 'stack_master/stack_differ'
|
47
52
|
autoload :Validator, 'stack_master/validator'
|
53
|
+
autoload :ParameterValidator, 'stack_master/parameter_validator'
|
48
54
|
|
49
55
|
require 'stack_master/template_compilers/sparkle_formation'
|
50
56
|
require 'stack_master/template_compilers/json'
|
51
57
|
require 'stack_master/template_compilers/yaml'
|
58
|
+
require 'stack_master/template_compilers/yaml_erb'
|
52
59
|
require 'stack_master/template_compilers/cfndsl'
|
53
60
|
|
54
61
|
module Commands
|
55
62
|
autoload :TerminalHelper, 'stack_master/commands/terminal_helper'
|
56
63
|
autoload :Apply, 'stack_master/commands/apply'
|
64
|
+
autoload :Drift, 'stack_master/commands/drift'
|
57
65
|
autoload :Events, 'stack_master/commands/events'
|
58
66
|
autoload :Outputs, 'stack_master/commands/outputs'
|
59
67
|
autoload :Init, 'stack_master/commands/init'
|
@@ -66,6 +74,7 @@ module StackMaster
|
|
66
74
|
autoload :Delete, 'stack_master/commands/delete'
|
67
75
|
autoload :Status, 'stack_master/commands/status'
|
68
76
|
autoload :Tidy, 'stack_master/commands/tidy'
|
77
|
+
autoload :Nag, 'stack_master/commands/nag'
|
69
78
|
end
|
70
79
|
|
71
80
|
module ParameterResolvers
|
@@ -128,7 +137,7 @@ module StackMaster
|
|
128
137
|
|
129
138
|
def debug(message)
|
130
139
|
return unless debug?
|
131
|
-
stderr.puts "[DEBUG] #{message}".
|
140
|
+
stderr.puts Rainbow("[DEBUG] #{message}").color(:green)
|
132
141
|
end
|
133
142
|
|
134
143
|
def quiet!
|
@@ -196,4 +205,16 @@ module StackMaster
|
|
196
205
|
def stderr=(io)
|
197
206
|
@stderr = io
|
198
207
|
end
|
208
|
+
|
209
|
+
def colorize(text, color)
|
210
|
+
if colorize?
|
211
|
+
Rainbow(text).color(color)
|
212
|
+
else
|
213
|
+
text
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
def colorize?
|
218
|
+
ENV.fetch('COLORIZE') { 'true' } == 'true'
|
219
|
+
end
|
199
220
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_master
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Hodgkiss
|
8
8
|
- Glen Stampoultzis
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -143,20 +143,20 @@ dependencies:
|
|
143
143
|
requirements:
|
144
144
|
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: 4.
|
146
|
+
version: 4.6.0
|
147
147
|
- - "<"
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
149
|
+
version: '6'
|
150
150
|
type: :runtime
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
154
|
- - ">="
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: 4.
|
156
|
+
version: 4.6.0
|
157
157
|
- - "<"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
159
|
+
version: '6'
|
160
160
|
- !ruby/object:Gem::Dependency
|
161
161
|
name: aws-sdk-acm
|
162
162
|
requirement: !ruby/object:Gem::Requirement
|
@@ -255,6 +255,34 @@ dependencies:
|
|
255
255
|
- - "~>"
|
256
256
|
- !ruby/object:Gem::Version
|
257
257
|
version: '1'
|
258
|
+
- !ruby/object:Gem::Dependency
|
259
|
+
name: aws-sdk-iam
|
260
|
+
requirement: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - "~>"
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '1'
|
265
|
+
type: :runtime
|
266
|
+
prerelease: false
|
267
|
+
version_requirements: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '1'
|
272
|
+
- !ruby/object:Gem::Dependency
|
273
|
+
name: sorted_set
|
274
|
+
requirement: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0'
|
279
|
+
type: :runtime
|
280
|
+
prerelease: false
|
281
|
+
version_requirements: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
258
286
|
- !ruby/object:Gem::Dependency
|
259
287
|
name: diffy
|
260
288
|
requirement: !ruby/object:Gem::Requirement
|
@@ -284,7 +312,7 @@ dependencies:
|
|
284
312
|
- !ruby/object:Gem::Version
|
285
313
|
version: '0'
|
286
314
|
- !ruby/object:Gem::Dependency
|
287
|
-
name:
|
315
|
+
name: rainbow
|
288
316
|
requirement: !ruby/object:Gem::Requirement
|
289
317
|
requirements:
|
290
318
|
- - ">="
|
@@ -357,16 +385,16 @@ dependencies:
|
|
357
385
|
name: cfndsl
|
358
386
|
requirement: !ruby/object:Gem::Requirement
|
359
387
|
requirements:
|
360
|
-
- - "
|
388
|
+
- - "~>"
|
361
389
|
- !ruby/object:Gem::Version
|
362
|
-
version: '1
|
390
|
+
version: '1'
|
363
391
|
type: :runtime
|
364
392
|
prerelease: false
|
365
393
|
version_requirements: !ruby/object:Gem::Requirement
|
366
394
|
requirements:
|
367
|
-
- - "
|
395
|
+
- - "~>"
|
368
396
|
- !ruby/object:Gem::Version
|
369
|
-
version: '1
|
397
|
+
version: '1'
|
370
398
|
- !ruby/object:Gem::Dependency
|
371
399
|
name: multi_json
|
372
400
|
requirement: !ruby/object:Gem::Requirement
|
@@ -423,6 +451,26 @@ dependencies:
|
|
423
451
|
- - ">="
|
424
452
|
- !ruby/object:Gem::Version
|
425
453
|
version: '0'
|
454
|
+
- !ruby/object:Gem::Dependency
|
455
|
+
name: cfn-nag
|
456
|
+
requirement: !ruby/object:Gem::Requirement
|
457
|
+
requirements:
|
458
|
+
- - ">="
|
459
|
+
- !ruby/object:Gem::Version
|
460
|
+
version: 0.6.7
|
461
|
+
- - "<"
|
462
|
+
- !ruby/object:Gem::Version
|
463
|
+
version: 0.9.0
|
464
|
+
type: :runtime
|
465
|
+
prerelease: false
|
466
|
+
version_requirements: !ruby/object:Gem::Requirement
|
467
|
+
requirements:
|
468
|
+
- - ">="
|
469
|
+
- !ruby/object:Gem::Version
|
470
|
+
version: 0.6.7
|
471
|
+
- - "<"
|
472
|
+
- !ruby/object:Gem::Version
|
473
|
+
version: 0.9.0
|
426
474
|
description: ''
|
427
475
|
email:
|
428
476
|
- steve@hodgkiss.me
|
@@ -432,6 +480,7 @@ executables:
|
|
432
480
|
extensions: []
|
433
481
|
extra_rdoc_files: []
|
434
482
|
files:
|
483
|
+
- LICENSE.txt
|
435
484
|
- README.md
|
436
485
|
- bin/stack_master
|
437
486
|
- lib/stack_master.rb
|
@@ -439,15 +488,19 @@ files:
|
|
439
488
|
- lib/stack_master/aws_driver/s3.rb
|
440
489
|
- lib/stack_master/change_set.rb
|
441
490
|
- lib/stack_master/cli.rb
|
491
|
+
- lib/stack_master/cloudformation_interpolating_eruby.rb
|
492
|
+
- lib/stack_master/cloudformation_template_eruby.rb
|
442
493
|
- lib/stack_master/command.rb
|
443
494
|
- lib/stack_master/commands/apply.rb
|
444
495
|
- lib/stack_master/commands/compile.rb
|
445
496
|
- lib/stack_master/commands/delete.rb
|
446
497
|
- lib/stack_master/commands/diff.rb
|
498
|
+
- lib/stack_master/commands/drift.rb
|
447
499
|
- lib/stack_master/commands/events.rb
|
448
500
|
- lib/stack_master/commands/init.rb
|
449
501
|
- lib/stack_master/commands/lint.rb
|
450
502
|
- lib/stack_master/commands/list_stacks.rb
|
503
|
+
- lib/stack_master/commands/nag.rb
|
451
504
|
- lib/stack_master/commands/outputs.rb
|
452
505
|
- lib/stack_master/commands/resources.rb
|
453
506
|
- lib/stack_master/commands/status.rb
|
@@ -456,6 +509,7 @@ files:
|
|
456
509
|
- lib/stack_master/commands/validate.rb
|
457
510
|
- lib/stack_master/config.rb
|
458
511
|
- lib/stack_master/ctrl_c.rb
|
512
|
+
- lib/stack_master/diff.rb
|
459
513
|
- lib/stack_master/identity.rb
|
460
514
|
- lib/stack_master/paged_response_accumulator.rb
|
461
515
|
- lib/stack_master/parameter_loader.rb
|
@@ -472,6 +526,7 @@ files:
|
|
472
526
|
- lib/stack_master/parameter_resolvers/security_group.rb
|
473
527
|
- lib/stack_master/parameter_resolvers/sns_topic_name.rb
|
474
528
|
- lib/stack_master/parameter_resolvers/stack_output.rb
|
529
|
+
- lib/stack_master/parameter_validator.rb
|
475
530
|
- lib/stack_master/prompter.rb
|
476
531
|
- lib/stack_master/resolver_array.rb
|
477
532
|
- lib/stack_master/role_assumer.rb
|
@@ -506,6 +561,7 @@ files:
|
|
506
561
|
- lib/stack_master/template_compilers/json.rb
|
507
562
|
- lib/stack_master/template_compilers/sparkle_formation.rb
|
508
563
|
- lib/stack_master/template_compilers/yaml.rb
|
564
|
+
- lib/stack_master/template_compilers/yaml_erb.rb
|
509
565
|
- lib/stack_master/template_utils.rb
|
510
566
|
- lib/stack_master/test_driver/cloud_formation.rb
|
511
567
|
- lib/stack_master/test_driver/s3.rb
|
@@ -523,9 +579,9 @@ licenses:
|
|
523
579
|
metadata:
|
524
580
|
bug_tracker_uri: https://github.com/envato/stack_master/issues
|
525
581
|
changelog_uri: https://github.com/envato/stack_master/blob/master/CHANGELOG.md
|
526
|
-
documentation_uri: https://www.rubydoc.info/gems/stack_master/2.
|
527
|
-
source_code_uri: https://github.com/envato/stack_master/tree/v2.
|
528
|
-
post_install_message:
|
582
|
+
documentation_uri: https://www.rubydoc.info/gems/stack_master/2.14.1
|
583
|
+
source_code_uri: https://github.com/envato/stack_master/tree/v2.14.1
|
584
|
+
post_install_message:
|
529
585
|
rdoc_options: []
|
530
586
|
require_paths:
|
531
587
|
- lib
|
@@ -540,8 +596,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
540
596
|
- !ruby/object:Gem::Version
|
541
597
|
version: '0'
|
542
598
|
requirements: []
|
543
|
-
rubygems_version: 3.
|
544
|
-
signing_key:
|
599
|
+
rubygems_version: 3.3.26
|
600
|
+
signing_key:
|
545
601
|
specification_version: 4
|
546
602
|
summary: StackMaster is a sure-footed way of creating, updating and keeping track
|
547
603
|
of Amazon (AWS) CloudFormation stacks.
|