terraspace 0.6.23 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cody/README.md +2 -0
- data/.cody/azurerm/bin/az/configure.sh +5 -1
- data/.cody/azurerm/project.rb +4 -0
- data/.cody/azurerm/role.rb +0 -1
- data/.cody/google/bin/gcloud/configure.sh +2 -1
- data/.cody/google/project.rb +4 -0
- data/.cody/google/role.rb +0 -1
- data/.cody/none/bin/build.sh +15 -0
- data/.cody/none/buildspec.yml +10 -0
- data/.cody/none/project.rb +2 -0
- data/.cody/none/role.rb +4 -0
- data/.cody/shared/script/install/terraform.sh +14 -6
- data/.cody/unit/buildspec.yml +1 -0
- data/.pipedream/pipeline.rb +1 -0
- data/CHANGELOG.md +28 -0
- data/Gemfile +6 -0
- data/README.md +1 -1
- data/lib/templates/examples/hcl/module/main.tf +3 -0
- data/lib/templates/examples/hcl/module/outputs.tf +4 -0
- data/lib/templates/examples/hcl/module/variables.tf +5 -0
- data/lib/templates/examples/hcl/stack/main.tf +4 -0
- data/lib/templates/examples/hcl/stack/outputs.tf +4 -0
- data/lib/templates/examples/hcl/stack/variables.tf +5 -0
- data/lib/templates/examples/ruby/module/main.rb +3 -0
- data/lib/templates/examples/ruby/module/outputs.rb +4 -0
- data/lib/templates/examples/ruby/module/variables.rb +5 -0
- data/lib/templates/examples/ruby/stack/main.rb +4 -0
- data/lib/templates/examples/ruby/stack/outputs.rb +4 -0
- data/lib/templates/examples/ruby/stack/variables.rb +5 -0
- data/lib/templates/hcl/project/config/terraform/backend.tf.tt +5 -13
- data/lib/templates/hcl/project/config/terraform/provider.tf +4 -14
- data/lib/terraspace/autodetect.rb +15 -0
- data/lib/terraspace/autoloader.rb +6 -1
- data/lib/terraspace/builder.rb +1 -9
- data/lib/terraspace/bundle.rb +54 -0
- data/lib/terraspace/cli/concern.rb +113 -0
- data/lib/terraspace/cli/help/new/example.md +7 -1
- data/lib/terraspace/cli/help.rb +7 -8
- data/lib/terraspace/cli/new/example.rb +36 -0
- data/lib/terraspace/cli/new/helpers/plugin_gem.rb +2 -14
- data/lib/terraspace/cli/new/helpers.rb +1 -1
- data/lib/terraspace/cli/new/module.rb +1 -1
- data/lib/terraspace/cli/new/plugin/helper.rb +1 -1
- data/lib/terraspace/cli/new/plugin.rb +1 -1
- data/lib/terraspace/cli/new/project.rb +11 -17
- data/lib/terraspace/cli/new/sequence.rb +1 -1
- data/lib/terraspace/cli/new/source/core.rb +7 -6
- data/lib/terraspace/cli/new/source/plugin.rb +2 -2
- data/lib/terraspace/cli/new/stack.rb +3 -2
- data/lib/terraspace/cli/new/test.rb +12 -2
- data/lib/terraspace/cli/new.rb +4 -0
- data/lib/terraspace/cli/{check_setup.rb → setup/check.rb} +5 -3
- data/lib/terraspace/cli/setup.rb +9 -0
- data/lib/terraspace/cli/tfc_concern.rb +1 -1
- data/lib/terraspace/cli.rb +34 -27
- data/lib/terraspace/command.rb +3 -2
- data/lib/terraspace/compiler/commands_concern.rb +0 -8
- data/lib/terraspace/compiler/expander/backend.rb +44 -0
- data/lib/terraspace/compiler/expander.rb +11 -19
- data/lib/terraspace/core.rb +10 -0
- data/lib/terraspace/plugin/expander/friendly.rb +1 -0
- data/lib/terraspace/plugin/expander/interface.rb +13 -2
- data/lib/terraspace/terraform/api/client.rb +1 -1
- data/lib/terraspace/terraform/args/custom.rb +11 -6
- data/lib/terraspace/terraform/args/pass.rb +110 -0
- data/lib/terraspace/terraform/args/{default.rb → thor.rb} +1 -3
- data/lib/terraspace/{compiler → terraform/runner}/backend/parser.rb +1 -1
- data/lib/terraspace/{compiler → terraform/runner}/backend.rb +14 -1
- data/lib/terraspace/terraform/runner/retryer.rb +1 -1
- data/lib/terraspace/terraform/runner.rb +25 -15
- data/lib/terraspace/terraform/tfc/sync.rb +1 -1
- data/lib/terraspace/version.rb +1 -1
- data/spec/terraspace/terraform/args/custom_spec.rb +4 -4
- data/spec/terraspace/terraform/args/pass_spec.rb +101 -0
- data/terraspace.gemspec +2 -4
- metadata +46 -50
@@ -16,7 +16,7 @@ class Terraspace::Terraform::Api
|
|
16
16
|
|
17
17
|
# backend may be overridden in classes including this Concern
|
18
18
|
def backend
|
19
|
-
Terraspace::
|
19
|
+
Terraspace::Terraform::Runner::Backend::Parser.new(@mod).result
|
20
20
|
end
|
21
21
|
memoize :backend
|
22
22
|
|
@@ -18,23 +18,28 @@ module Terraspace::Terraform::Args
|
|
18
18
|
memoize :build
|
19
19
|
|
20
20
|
def args
|
21
|
+
terraform_args + var_file_args
|
22
|
+
end
|
23
|
+
|
24
|
+
def env_vars
|
25
|
+
build
|
26
|
+
dig("env", {})
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
def terraform_args
|
21
31
|
build
|
22
32
|
args = dig("args")
|
23
33
|
args.compact.flatten
|
24
34
|
end
|
25
35
|
|
26
|
-
def
|
36
|
+
def var_file_args
|
27
37
|
build
|
28
38
|
var_files = dig("var_files")
|
29
39
|
var_files.select! { |f| var_file_exist?(f) }
|
30
40
|
var_files.map { |f| "-var-file=#{f}" }
|
31
41
|
end
|
32
42
|
|
33
|
-
def env_vars
|
34
|
-
build
|
35
|
-
dig("env", {})
|
36
|
-
end
|
37
|
-
|
38
43
|
def var_file_exist?(var_file)
|
39
44
|
File.exist?("#{@mod.cache_dir}/#{var_file}")
|
40
45
|
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
module Terraspace::Terraform::Args
|
2
|
+
class Pass
|
3
|
+
def initialize(mod, name, options={})
|
4
|
+
@mod, @name, @options = mod, name.underscore, options
|
5
|
+
end
|
6
|
+
|
7
|
+
# map to terraform options and only allow valid terraform options
|
8
|
+
# Arg Examples:
|
9
|
+
# -refresh-only
|
10
|
+
# -refresh=false
|
11
|
+
# -var 'foo=bar'
|
12
|
+
def args
|
13
|
+
args = pass_args.select do |arg|
|
14
|
+
arg_name = get_arg_name(arg)
|
15
|
+
terraform_arg_types.include?(arg_name)
|
16
|
+
end
|
17
|
+
|
18
|
+
args.map { |arg| "-#{arg}" } # add back in the leading single dash (-)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
def pass_args
|
23
|
+
args = (@options[:args] || []).map do |o|
|
24
|
+
o.sub(/^-{1,2}/,'') # strips the - or --
|
25
|
+
end
|
26
|
+
reconstruct_hash_args(args)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Thor parses CLI args -var 'foo=bar'
|
30
|
+
# as:
|
31
|
+
# ["-var", "foo=bar"]
|
32
|
+
# instead of:
|
33
|
+
# ["-var 'foo=bar'"]
|
34
|
+
#
|
35
|
+
# So reconstruct it to what works with terraform CLI args
|
36
|
+
def reconstruct_hash_args(args)
|
37
|
+
result = []
|
38
|
+
flatten = []
|
39
|
+
skip = false
|
40
|
+
args.each do |arg|
|
41
|
+
arg_type = terraform_arg_types[arg]
|
42
|
+
if arg_type == :hash || skip
|
43
|
+
skip = true
|
44
|
+
if flatten.size == 1
|
45
|
+
flatten << "'#{arg}'" # surround hash value with single quotes
|
46
|
+
else
|
47
|
+
flatten << arg
|
48
|
+
end
|
49
|
+
if flatten.size == 2 # time to grab value and end skipping
|
50
|
+
result << flatten.join(' ')
|
51
|
+
# reset flags
|
52
|
+
skip = false
|
53
|
+
flatten = []
|
54
|
+
end
|
55
|
+
next if skip
|
56
|
+
else
|
57
|
+
result << arg # boolean (-no-color) or assignment (-refresh=false)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
result
|
61
|
+
end
|
62
|
+
|
63
|
+
# Parses terraform COMMAND -help output for arg types.
|
64
|
+
# Return Example:
|
65
|
+
#
|
66
|
+
# {
|
67
|
+
# destroy: :boolean,
|
68
|
+
# refresh: :assignment,
|
69
|
+
# var: :hash,
|
70
|
+
# }
|
71
|
+
#
|
72
|
+
def terraform_arg_types
|
73
|
+
out = terraform_help(@name)
|
74
|
+
lines = out.split("\n")
|
75
|
+
lines.select! do |line|
|
76
|
+
line =~ /^ -/
|
77
|
+
end
|
78
|
+
lines.inject({}) do |result, line|
|
79
|
+
# in: " -replace=resource Force replacement of a particular resource instance using",
|
80
|
+
# out: "-replace=resource Force replacement of a particular resource instance using",
|
81
|
+
line.sub!(' -', '') # remove leading whitespace and -
|
82
|
+
|
83
|
+
# in: " -var 'foo=bar' Set a value for one of the input variables in the root",
|
84
|
+
# out: "var"
|
85
|
+
# in: " -refresh=false Skip checking for external changes to remote objects",
|
86
|
+
# out: "refresh"
|
87
|
+
arg_name = get_arg_name(line)
|
88
|
+
|
89
|
+
if line.match(/'\w+=\w+'/) # hash. IE: -var 'foo=bar'
|
90
|
+
result[arg_name] = :hash
|
91
|
+
elsif line.match(/\w+=/) # value IE: -refresh=false
|
92
|
+
result[arg_name] = :assignment # can include string and numeric values
|
93
|
+
else # boolean IE: -refresh-only
|
94
|
+
result[arg_name] = :boolean
|
95
|
+
end
|
96
|
+
result
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def get_arg_name(line)
|
101
|
+
line.sub(/\s+.*/,'').split('=').first # strips everything except arg name only
|
102
|
+
end
|
103
|
+
|
104
|
+
@@terraform_help = {}
|
105
|
+
def terraform_help(name)
|
106
|
+
@@terraform_help[name] ||= `terraform #{name} -help`
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "tempfile"
|
2
2
|
|
3
3
|
module Terraspace::Terraform::Args
|
4
|
-
class
|
4
|
+
class Thor
|
5
5
|
def initialize(mod, name, options={})
|
6
6
|
@mod, @name, @options = mod, name.underscore, options
|
7
7
|
@quiet = @options[:quiet].nil? ? true : @options[:quiet]
|
@@ -81,7 +81,6 @@ module Terraspace::Terraform::Args
|
|
81
81
|
|
82
82
|
def output_args
|
83
83
|
args = []
|
84
|
-
args << "-json" if @options[:format] == "json"
|
85
84
|
args << "> #{expanded_out}" if @options[:out]
|
86
85
|
args
|
87
86
|
end
|
@@ -98,7 +97,6 @@ module Terraspace::Terraform::Args
|
|
98
97
|
|
99
98
|
def show_args
|
100
99
|
args = []
|
101
|
-
args << " -json" if @options[:json]
|
102
100
|
plan = @options[:plan]
|
103
101
|
if plan
|
104
102
|
copy_to_cache(@options[:plan])
|
@@ -1,6 +1,7 @@
|
|
1
|
-
|
1
|
+
class Terraspace::Terraform::Runner
|
2
2
|
class Backend
|
3
3
|
extend Memoist
|
4
|
+
include Terraspace::Compiler::CommandsConcern
|
4
5
|
|
5
6
|
def initialize(mod)
|
6
7
|
@mod = mod
|
@@ -9,6 +10,9 @@ module Terraspace::Compiler
|
|
9
10
|
@@created = {}
|
10
11
|
def create
|
11
12
|
return if @@created[cache_key]
|
13
|
+
return if Terraspace.config.auto_create_backend == false
|
14
|
+
return unless requires_backend?
|
15
|
+
|
12
16
|
# set immediately, since local storage wont reach bottom.
|
13
17
|
# if fail for other backends, there will be an exception anyway
|
14
18
|
@@created[cache_key] = true
|
@@ -16,6 +20,7 @@ module Terraspace::Compiler
|
|
16
20
|
klass = backend_interface(backend_name)
|
17
21
|
return unless klass # in case auto-creation is not supported for specific backend
|
18
22
|
|
23
|
+
# IE: TerraspacePluginAws::Interfaces::Backend.new
|
19
24
|
interface = klass.new(backend_info)
|
20
25
|
interface.call
|
21
26
|
end
|
@@ -44,5 +49,13 @@ module Terraspace::Compiler
|
|
44
49
|
klass_name.constantize if klass_name
|
45
50
|
rescue NameError
|
46
51
|
end
|
52
|
+
|
53
|
+
def requires_backend?
|
54
|
+
command_is?(requires_backend_commands)
|
55
|
+
end
|
56
|
+
|
57
|
+
def requires_backend_commands
|
58
|
+
%w[down init output plan providers refresh show up validate]
|
59
|
+
end
|
47
60
|
end
|
48
61
|
end
|
@@ -9,7 +9,7 @@ class Terraspace::Terraform::Runner
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def retry?
|
12
|
-
max_retries = ENV['TS_MAX_RETRIES'] ? ENV['TS_MAX_RETRIES'].to_i :
|
12
|
+
max_retries = ENV['TS_MAX_RETRIES'] ? ENV['TS_MAX_RETRIES'].to_i : 1
|
13
13
|
if @retries <= max_retries && !@stop_retrying
|
14
14
|
true # will retry
|
15
15
|
else
|
@@ -16,12 +16,37 @@ module Terraspace::Terraform
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
# default at end in case of redirection. IE: terraform output > /path
|
20
|
+
def args
|
21
|
+
args = custom.args + thor.args + pass.args
|
22
|
+
args.uniq
|
23
|
+
end
|
24
|
+
|
25
|
+
# From config/args/terraform.rb https://terraspace.cloud/docs/config/args/terraform/
|
26
|
+
def custom
|
27
|
+
Args::Custom.new(@mod, @name)
|
28
|
+
end
|
29
|
+
memoize :custom
|
30
|
+
|
31
|
+
# From Thor defined/managed cli @options
|
32
|
+
def thor
|
33
|
+
Args::Thor.new(@mod, @name, @options)
|
34
|
+
end
|
35
|
+
memoize :thor
|
36
|
+
|
37
|
+
# From Thor passthrough cli @options[:args]
|
38
|
+
def pass
|
39
|
+
Args::Pass.new(@mod, @name, @options)
|
40
|
+
end
|
41
|
+
memoize :pass
|
42
|
+
|
19
43
|
def terraform(name, *args)
|
20
44
|
current_dir_message # only show once
|
21
45
|
|
22
46
|
params = args.flatten.join(' ')
|
23
47
|
command = "terraform #{name} #{params}".squish
|
24
48
|
run_hooks("terraform.rb", name) do
|
49
|
+
Backend.new(@mod).create
|
25
50
|
run_internal_hook(:before, name)
|
26
51
|
Terraspace::Shell.new(@mod, command, @options.merge(env: custom.env_vars)).run
|
27
52
|
run_internal_hook(:after, name)
|
@@ -58,21 +83,6 @@ module Terraspace::Terraform
|
|
58
83
|
@options[:quiet] ? logger.debug(msg) : logger.info(msg)
|
59
84
|
end
|
60
85
|
|
61
|
-
def args
|
62
|
-
# base at end in case of redirection. IE: terraform output > /path
|
63
|
-
custom.args + custom.var_files + default.args
|
64
|
-
end
|
65
|
-
|
66
|
-
def custom
|
67
|
-
Args::Custom.new(@mod, @name)
|
68
|
-
end
|
69
|
-
memoize :custom
|
70
|
-
|
71
|
-
def default
|
72
|
-
Args::Default.new(@mod, @name, @options)
|
73
|
-
end
|
74
|
-
memoize :default
|
75
|
-
|
76
86
|
private
|
77
87
|
def time_took
|
78
88
|
t1 = Time.now
|
data/lib/terraspace/version.rb
CHANGED
@@ -20,10 +20,10 @@ describe Terraspace::Terraform::Args::Custom do
|
|
20
20
|
expect(custom.args).to eq(["-lock-timeout=20m"])
|
21
21
|
end
|
22
22
|
|
23
|
-
it "
|
23
|
+
it "var_file_args" do
|
24
24
|
custom.evaluate_file(file)
|
25
25
|
allow(custom).to receive(:var_file_exist?).and_return(true)
|
26
|
-
expect(custom.
|
26
|
+
expect(custom.send(:var_file_args)).to eq(["-var-file=a.tfvars", "-var-file=b.tfvars"])
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -41,10 +41,10 @@ describe Terraspace::Terraform::Args::Custom do
|
|
41
41
|
expect(custom.args).to eq(["-lock-timeout=20m"])
|
42
42
|
end
|
43
43
|
|
44
|
-
it "
|
44
|
+
it "var_file_args" do
|
45
45
|
custom.evaluate_file(file)
|
46
46
|
allow(custom).to receive(:var_file_exist?).and_return(true)
|
47
|
-
expect(custom.
|
47
|
+
expect(custom.send(:var_file_args)).to eq([])
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
describe Terraspace::Terraform::Args::Pass do
|
2
|
+
let(:pass) do
|
3
|
+
described_class.new(mod, name, options)
|
4
|
+
end
|
5
|
+
let(:mod) { double(:mod).as_null_object }
|
6
|
+
let(:options) { {args: args} }
|
7
|
+
# defaults
|
8
|
+
let(:name) { "plan" }
|
9
|
+
let(:args) { [] }
|
10
|
+
|
11
|
+
context "boolean flag" do
|
12
|
+
let(:args) { ["-refresh-only"] }
|
13
|
+
it "pass through args" do
|
14
|
+
args = pass.args
|
15
|
+
expect(args).to eq ["-refresh-only"]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "assignment arg" do
|
20
|
+
context "-refresh=false" do
|
21
|
+
let(:args) { ["-refresh=false"] }
|
22
|
+
it "pass through args" do
|
23
|
+
args = pass.args
|
24
|
+
expect(args).to eq ["-refresh=false"]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context "-lock-timeout=5s" do
|
29
|
+
let(:args) { ["-lock-timeout=5s"] }
|
30
|
+
it "pass through args" do
|
31
|
+
args = pass.args
|
32
|
+
expect(args).to eq ["-lock-timeout=5s"]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "-var-file=filename -lock-timeout=5s" do
|
37
|
+
let(:args) { ["-var-file=filename', '-lock-timeout=5s"] }
|
38
|
+
it "pass through args" do
|
39
|
+
args = pass.args
|
40
|
+
expect(args).to eq ["-var-file=filename', '-lock-timeout=5s"]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# normalizes -- to -
|
45
|
+
context "--var-file=filename --lock-timeout=5s" do
|
46
|
+
let(:args) { ["--var-file=filename", "--lock-timeout=5s"] }
|
47
|
+
it "pass through args" do
|
48
|
+
args = pass.args
|
49
|
+
expect(args).to eq ["-var-file=filename", "-lock-timeout=5s"]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
context "hash arg" do
|
55
|
+
context "-var 'foo=bar'" do
|
56
|
+
let(:args) { ["-var 'foo=bar'"] }
|
57
|
+
it "pass through args" do
|
58
|
+
args = pass.args
|
59
|
+
expect(args).to eq ["-var 'foo=bar'"]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context "['-var', 'foo=bar'] improperly passed due to Thor CLI parsing" do
|
64
|
+
let(:args) { ["-var", "foo=bar"] }
|
65
|
+
it "reconstruct to work with terraform cli" do
|
66
|
+
args = pass.send(:pass_args)
|
67
|
+
expect(args).to eq ["var 'foo=bar'"]
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Works at the parsing level. Also works at Thor CLI parsing level. To test:
|
73
|
+
#
|
74
|
+
# terraspace plan demo -refresh=false -no-color -var 'foo=bar' -var 'foo2=bar2'
|
75
|
+
#
|
76
|
+
# Results in:
|
77
|
+
#
|
78
|
+
# terraform plan -input=false -refresh=false -no-color -var 'foo=bar' -var 'foo2=bar2'
|
79
|
+
#
|
80
|
+
context "multiple hash arg" do
|
81
|
+
context "-var 'foo=bar' -var 'foo2=bar2'" do
|
82
|
+
let(:args) { ["-var 'foo=bar'", "-var 'foo2=bar2'"] }
|
83
|
+
it "pass through args" do
|
84
|
+
args = pass.args
|
85
|
+
expect(args).to eq ["-var 'foo=bar'", "-var 'foo2=bar2'"]
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Could mock out Pass#terraform_help with fixtures,
|
91
|
+
# but will call out to terraform in specs so to see breakage more quickly.
|
92
|
+
context "terraform_arg_types" do
|
93
|
+
it "parses help output to determine arg types" do
|
94
|
+
args = pass.send(:terraform_arg_types)
|
95
|
+
# checking specific keys so spec is more robust to terraform cli changes
|
96
|
+
expect(args['destroy']).to eq(:boolean)
|
97
|
+
expect(args['refresh']).to eq(:assignment)
|
98
|
+
expect(args['var']).to eq(:hash)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
data/terraspace.gemspec
CHANGED
@@ -29,15 +29,13 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_dependency "memoist"
|
30
30
|
spec.add_dependency "rainbow"
|
31
31
|
spec.add_dependency "render_me_pretty"
|
32
|
-
spec.add_dependency "
|
32
|
+
spec.add_dependency "rexml"
|
33
|
+
spec.add_dependency "terraspace-bundler", "~> 0.4.4"
|
33
34
|
spec.add_dependency "thor"
|
34
35
|
spec.add_dependency "tty-tree"
|
35
36
|
spec.add_dependency "zeitwerk"
|
36
37
|
|
37
38
|
# core baseline plugins
|
38
|
-
spec.add_dependency "terraspace_plugin_aws", "~> 0.3.0"
|
39
|
-
spec.add_dependency "terraspace_plugin_azurerm", "~> 0.3.0"
|
40
|
-
spec.add_dependency "terraspace_plugin_google", "~> 0.3.0"
|
41
39
|
spec.add_dependency "rspec-terraspace", "~> 0.3.0"
|
42
40
|
|
43
41
|
spec.add_development_dependency "bundler"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -164,20 +164,34 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rexml
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: terraspace-bundler
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
185
|
- - "~>"
|
172
186
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.4.
|
187
|
+
version: 0.4.4
|
174
188
|
type: :runtime
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
192
|
- - "~>"
|
179
193
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.4.
|
194
|
+
version: 0.4.4
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: thor
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,48 +234,6 @@ dependencies:
|
|
220
234
|
- - ">="
|
221
235
|
- !ruby/object:Gem::Version
|
222
236
|
version: '0'
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: terraspace_plugin_aws
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - "~>"
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: 0.3.0
|
230
|
-
type: :runtime
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - "~>"
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: 0.3.0
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: terraspace_plugin_azurerm
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - "~>"
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: 0.3.0
|
244
|
-
type: :runtime
|
245
|
-
prerelease: false
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
247
|
-
requirements:
|
248
|
-
- - "~>"
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: 0.3.0
|
251
|
-
- !ruby/object:Gem::Dependency
|
252
|
-
name: terraspace_plugin_google
|
253
|
-
requirement: !ruby/object:Gem::Requirement
|
254
|
-
requirements:
|
255
|
-
- - "~>"
|
256
|
-
- !ruby/object:Gem::Version
|
257
|
-
version: 0.3.0
|
258
|
-
type: :runtime
|
259
|
-
prerelease: false
|
260
|
-
version_requirements: !ruby/object:Gem::Requirement
|
261
|
-
requirements:
|
262
|
-
- - "~>"
|
263
|
-
- !ruby/object:Gem::Version
|
264
|
-
version: 0.3.0
|
265
237
|
- !ruby/object:Gem::Dependency
|
266
238
|
name: rspec-terraspace
|
267
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -373,6 +345,10 @@ files:
|
|
373
345
|
- ".cody/google/buildspec.yml"
|
374
346
|
- ".cody/google/project.rb"
|
375
347
|
- ".cody/google/role.rb"
|
348
|
+
- ".cody/none/bin/build.sh"
|
349
|
+
- ".cody/none/buildspec.yml"
|
350
|
+
- ".cody/none/project.rb"
|
351
|
+
- ".cody/none/role.rb"
|
376
352
|
- ".cody/shared/script/install.sh"
|
377
353
|
- ".cody/shared/script/install/terraform.sh"
|
378
354
|
- ".cody/shared/script/install/terraspace.sh"
|
@@ -410,6 +386,18 @@ files:
|
|
410
386
|
- lib/templates/base/project/Terrafile
|
411
387
|
- lib/templates/base/project/config/app.rb
|
412
388
|
- lib/templates/base/shim/terraspace
|
389
|
+
- lib/templates/examples/hcl/module/main.tf
|
390
|
+
- lib/templates/examples/hcl/module/outputs.tf
|
391
|
+
- lib/templates/examples/hcl/module/variables.tf
|
392
|
+
- lib/templates/examples/hcl/stack/main.tf
|
393
|
+
- lib/templates/examples/hcl/stack/outputs.tf
|
394
|
+
- lib/templates/examples/hcl/stack/variables.tf
|
395
|
+
- lib/templates/examples/ruby/module/main.rb
|
396
|
+
- lib/templates/examples/ruby/module/outputs.rb
|
397
|
+
- lib/templates/examples/ruby/module/variables.rb
|
398
|
+
- lib/templates/examples/ruby/stack/main.rb
|
399
|
+
- lib/templates/examples/ruby/stack/outputs.rb
|
400
|
+
- lib/templates/examples/ruby/stack/variables.rb
|
413
401
|
- lib/templates/hcl/module/main.tf
|
414
402
|
- lib/templates/hcl/module/outputs.tf
|
415
403
|
- lib/templates/hcl/module/variables.tf
|
@@ -477,6 +465,7 @@ files:
|
|
477
465
|
- lib/terraspace/all/summary.rb
|
478
466
|
- lib/terraspace/app.rb
|
479
467
|
- lib/terraspace/app/inits.rb
|
468
|
+
- lib/terraspace/autodetect.rb
|
480
469
|
- lib/terraspace/autoloader.rb
|
481
470
|
- lib/terraspace/booter.rb
|
482
471
|
- lib/terraspace/builder.rb
|
@@ -487,7 +476,6 @@ files:
|
|
487
476
|
- lib/terraspace/cli/base.rb
|
488
477
|
- lib/terraspace/cli/build/placeholder.rb
|
489
478
|
- lib/terraspace/cli/bundle.rb
|
490
|
-
- lib/terraspace/cli/check_setup.rb
|
491
479
|
- lib/terraspace/cli/clean.rb
|
492
480
|
- lib/terraspace/cli/clean/all.rb
|
493
481
|
- lib/terraspace/cli/clean/base.rb
|
@@ -497,6 +485,7 @@ files:
|
|
497
485
|
- lib/terraspace/cli/completer.rb
|
498
486
|
- lib/terraspace/cli/completer/script.rb
|
499
487
|
- lib/terraspace/cli/completer/script.sh
|
488
|
+
- lib/terraspace/cli/concern.rb
|
500
489
|
- lib/terraspace/cli/concerns/source_dirs.rb
|
501
490
|
- lib/terraspace/cli/down.rb
|
502
491
|
- lib/terraspace/cli/fmt.rb
|
@@ -564,6 +553,7 @@ files:
|
|
564
553
|
- lib/terraspace/cli/logs/concern.rb
|
565
554
|
- lib/terraspace/cli/new.rb
|
566
555
|
- lib/terraspace/cli/new/arg.rb
|
556
|
+
- lib/terraspace/cli/new/example.rb
|
567
557
|
- lib/terraspace/cli/new/git_hook.rb
|
568
558
|
- lib/terraspace/cli/new/helper.rb
|
569
559
|
- lib/terraspace/cli/new/helpers.rb
|
@@ -581,6 +571,8 @@ files:
|
|
581
571
|
- lib/terraspace/cli/new/stack.rb
|
582
572
|
- lib/terraspace/cli/new/test.rb
|
583
573
|
- lib/terraspace/cli/seed.rb
|
574
|
+
- lib/terraspace/cli/setup.rb
|
575
|
+
- lib/terraspace/cli/setup/check.rb
|
584
576
|
- lib/terraspace/cli/state.rb
|
585
577
|
- lib/terraspace/cli/summary.rb
|
586
578
|
- lib/terraspace/cli/test.rb
|
@@ -589,8 +581,6 @@ files:
|
|
589
581
|
- lib/terraspace/cli/tfc_concern.rb
|
590
582
|
- lib/terraspace/cli/up.rb
|
591
583
|
- lib/terraspace/command.rb
|
592
|
-
- lib/terraspace/compiler/backend.rb
|
593
|
-
- lib/terraspace/compiler/backend/parser.rb
|
594
584
|
- lib/terraspace/compiler/basename.rb
|
595
585
|
- lib/terraspace/compiler/builder.rb
|
596
586
|
- lib/terraspace/compiler/builder/skip.rb
|
@@ -621,6 +611,7 @@ files:
|
|
621
611
|
- lib/terraspace/compiler/erb/helpers.rb
|
622
612
|
- lib/terraspace/compiler/erb/render.rb
|
623
613
|
- lib/terraspace/compiler/expander.rb
|
614
|
+
- lib/terraspace/compiler/expander/backend.rb
|
624
615
|
- lib/terraspace/compiler/helper_extender.rb
|
625
616
|
- lib/terraspace/compiler/select.rb
|
626
617
|
- lib/terraspace/compiler/strategy/abstract_base.rb
|
@@ -690,9 +681,10 @@ files:
|
|
690
681
|
- lib/terraspace/terraform/api/vars/rb.rb
|
691
682
|
- lib/terraspace/terraform/api/workspace.rb
|
692
683
|
- lib/terraspace/terraform/args/custom.rb
|
693
|
-
- lib/terraspace/terraform/args/default.rb
|
694
684
|
- lib/terraspace/terraform/args/dsl.rb
|
685
|
+
- lib/terraspace/terraform/args/pass.rb
|
695
686
|
- lib/terraspace/terraform/args/shorthands.rb
|
687
|
+
- lib/terraspace/terraform/args/thor.rb
|
696
688
|
- lib/terraspace/terraform/ihooks/after/plan.rb
|
697
689
|
- lib/terraspace/terraform/ihooks/base.rb
|
698
690
|
- lib/terraspace/terraform/ihooks/before/plan.rb
|
@@ -702,6 +694,8 @@ files:
|
|
702
694
|
- lib/terraspace/terraform/remote_state/output_proxy.rb
|
703
695
|
- lib/terraspace/terraform/remote_state/unresolved.rb
|
704
696
|
- lib/terraspace/terraform/runner.rb
|
697
|
+
- lib/terraspace/terraform/runner/backend.rb
|
698
|
+
- lib/terraspace/terraform/runner/backend/parser.rb
|
705
699
|
- lib/terraspace/terraform/runner/retryer.rb
|
706
700
|
- lib/terraspace/terraform/tfc/runs.rb
|
707
701
|
- lib/terraspace/terraform/tfc/runs/base.rb
|
@@ -844,6 +838,7 @@ files:
|
|
844
838
|
- spec/terraspace/seeder/content_spec.rb
|
845
839
|
- spec/terraspace/seeder_spec.rb
|
846
840
|
- spec/terraspace/terraform/args/custom_spec.rb
|
841
|
+
- spec/terraspace/terraform/args/pass_spec.rb
|
847
842
|
- spec/terraspace/terraform/remote_state/fetcher_spec.rb
|
848
843
|
- spec/terraspace/terraform/remote_state/marker/output_spec.rb
|
849
844
|
- spec/terraspace/terraform/remote_state/output_proxy_spec.rb
|
@@ -997,6 +992,7 @@ test_files:
|
|
997
992
|
- spec/terraspace/seeder/content_spec.rb
|
998
993
|
- spec/terraspace/seeder_spec.rb
|
999
994
|
- spec/terraspace/terraform/args/custom_spec.rb
|
995
|
+
- spec/terraspace/terraform/args/pass_spec.rb
|
1000
996
|
- spec/terraspace/terraform/remote_state/fetcher_spec.rb
|
1001
997
|
- spec/terraspace/terraform/remote_state/marker/output_spec.rb
|
1002
998
|
- spec/terraspace/terraform/remote_state/output_proxy_spec.rb
|