terraspace 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.cody/aws/bin/build.sh +2 -0
  3. data/.cody/azurerm/bin/build.sh +2 -0
  4. data/.cody/google/bin/build.sh +2 -0
  5. data/CHANGELOG.md +38 -0
  6. data/README.md +2 -2
  7. data/lib/templates/base/project/README.md +1 -1
  8. data/lib/terraspace.rb +2 -0
  9. data/lib/terraspace/all/preview.rb +1 -1
  10. data/lib/terraspace/all/runner.rb +1 -0
  11. data/lib/terraspace/all/summary.rb +29 -2
  12. data/lib/terraspace/app.rb +9 -5
  13. data/lib/terraspace/builder.rb +11 -12
  14. data/lib/terraspace/cli.rb +33 -39
  15. data/lib/terraspace/cli/all.rb +15 -9
  16. data/lib/terraspace/cli/bundle.rb +2 -1
  17. data/lib/terraspace/cli/clean.rb +18 -6
  18. data/lib/terraspace/cli/clean/all.rb +18 -0
  19. data/lib/terraspace/cli/clean/base.rb +15 -0
  20. data/lib/terraspace/cli/clean/cache.rb +25 -0
  21. data/lib/terraspace/cli/{logs/tasks.rb → clean/logs.rb} +16 -5
  22. data/lib/terraspace/cli/cloud.rb +3 -9
  23. data/lib/terraspace/cli/cloud/runs.rb +0 -2
  24. data/lib/terraspace/cli/help/all/down.md +32 -0
  25. data/lib/terraspace/cli/help/all/graph.md +21 -0
  26. data/lib/terraspace/cli/help/all/output.md +22 -0
  27. data/lib/terraspace/cli/help/all/plan.md +25 -0
  28. data/lib/terraspace/cli/help/all/providers.md +21 -0
  29. data/lib/terraspace/cli/help/all/refresh.md +17 -0
  30. data/lib/terraspace/cli/help/all/show.md +21 -0
  31. data/lib/terraspace/cli/help/all/up.md +27 -0
  32. data/lib/terraspace/cli/help/all/validate.md +21 -0
  33. data/lib/terraspace/cli/help/build.md +6 -0
  34. data/lib/terraspace/cli/help/bundle.md +9 -5
  35. data/lib/terraspace/cli/help/check_setup.md +9 -0
  36. data/lib/terraspace/cli/help/clean/all.md +10 -0
  37. data/lib/terraspace/cli/help/clean/cache.md +12 -0
  38. data/lib/terraspace/cli/help/clean/logs.md +17 -0
  39. data/lib/terraspace/cli/help/cloud/destroy.md +16 -0
  40. data/lib/terraspace/cli/help/cloud/list.md +7 -0
  41. data/lib/terraspace/cli/help/cloud/runs/list.md +3 -3
  42. data/lib/terraspace/cli/help/cloud/runs/prune.md +2 -2
  43. data/lib/terraspace/cli/help/cloud/sync.md +26 -2
  44. data/lib/terraspace/cli/help/console.md +8 -0
  45. data/lib/terraspace/cli/help/down.md +26 -0
  46. data/lib/terraspace/cli/help/info.md +43 -0
  47. data/lib/terraspace/cli/help/init.md +37 -0
  48. data/lib/terraspace/cli/help/list.md +20 -0
  49. data/lib/terraspace/cli/help/logs.md +48 -0
  50. data/lib/terraspace/cli/help/logs/remove.md +5 -0
  51. data/lib/terraspace/cli/help/logs/truncate.md +5 -0
  52. data/lib/terraspace/cli/help/new/bootstrap_test.md +8 -0
  53. data/lib/terraspace/cli/help/new/example.md +8 -0
  54. data/lib/terraspace/cli/help/new/git_hook.md +6 -0
  55. data/lib/terraspace/cli/help/new/module.md +9 -0
  56. data/lib/terraspace/cli/help/new/module_test.md +12 -0
  57. data/lib/terraspace/cli/help/new/plugin.md +49 -0
  58. data/lib/terraspace/cli/help/new/project.md +40 -0
  59. data/lib/terraspace/cli/help/new/project_test.md +8 -0
  60. data/lib/terraspace/cli/help/new/shim.md +21 -0
  61. data/lib/terraspace/cli/help/new/stack.md +9 -0
  62. data/lib/terraspace/cli/help/output.md +6 -0
  63. data/lib/terraspace/cli/help/plan.md +29 -0
  64. data/lib/terraspace/cli/help/providers.md +18 -0
  65. data/lib/terraspace/cli/help/refresh.md +11 -0
  66. data/lib/terraspace/cli/help/seed.md +7 -0
  67. data/lib/terraspace/cli/help/show.md +36 -0
  68. data/lib/terraspace/cli/help/summary.md +11 -0
  69. data/lib/terraspace/cli/help/test.md +35 -0
  70. data/lib/terraspace/cli/help/up.md +30 -0
  71. data/lib/terraspace/cli/help/validate.md +9 -0
  72. data/lib/terraspace/cli/info.rb +4 -16
  73. data/lib/terraspace/cli/init.rb +3 -7
  74. data/lib/terraspace/cli/logs.rb +106 -9
  75. data/lib/terraspace/cli/{log → logs}/concern.rb +1 -1
  76. data/lib/terraspace/cli/new.rb +18 -18
  77. data/lib/terraspace/cli/new/git_hook.rb +4 -1
  78. data/lib/terraspace/cli/new/helper.rb +9 -2
  79. data/lib/terraspace/cli/new/project.rb +1 -1
  80. data/lib/terraspace/cli/summary.rb +2 -2
  81. data/lib/terraspace/command.rb +1 -1
  82. data/lib/terraspace/compiler/backend.rb +10 -0
  83. data/lib/terraspace/compiler/builder.rb +2 -1
  84. data/lib/terraspace/compiler/commands_concern.rb +18 -0
  85. data/lib/terraspace/compiler/dependencies/helpers.rb +34 -0
  86. data/lib/terraspace/compiler/dsl/syntax/helpers/common.rb +0 -26
  87. data/lib/terraspace/compiler/dsl/syntax/tfvar.rb +1 -0
  88. data/lib/terraspace/compiler/erb/context.rb +1 -1
  89. data/lib/terraspace/compiler/erb/helpers.rb +6 -0
  90. data/lib/terraspace/dependency/graph.rb +2 -1
  91. data/lib/terraspace/dependency/helper/base.rb +7 -0
  92. data/lib/terraspace/dependency/helper/depends_on.rb +12 -0
  93. data/lib/terraspace/dependency/helper/output.rb +11 -0
  94. data/lib/terraspace/hooks/builder.rb +52 -0
  95. data/lib/terraspace/hooks/concern.rb +9 -0
  96. data/lib/terraspace/{terraform/hooks → hooks}/dsl.rb +3 -2
  97. data/lib/terraspace/hooks/runner.rb +23 -0
  98. data/lib/terraspace/mod.rb +11 -2
  99. data/lib/terraspace/plugin/summary/interface.rb +4 -2
  100. data/lib/terraspace/shell.rb +50 -17
  101. data/lib/terraspace/terraform/args/custom.rb +1 -1
  102. data/lib/terraspace/terraform/cloud/runs/lister.rb +0 -2
  103. data/lib/terraspace/terraform/cloud/syncer.rb +2 -2
  104. data/lib/terraspace/terraform/cloud/workspace.rb +0 -9
  105. data/lib/terraspace/terraform/remote_state/fetcher.rb +37 -7
  106. data/lib/terraspace/terraform/remote_state/marker/output.rb +3 -1
  107. data/lib/terraspace/terraform/remote_state/output_proxy.rb +18 -14
  108. data/lib/terraspace/terraform/remote_state/unresolved.rb +40 -0
  109. data/lib/terraspace/terraform/runner.rb +2 -7
  110. data/lib/terraspace/version.rb +1 -1
  111. data/spec/fixtures/dependencies/app/stacks/a1/tfvars/dev.tfvars +1 -0
  112. data/spec/fixtures/fetcher/c1.json +4 -0
  113. data/spec/terraspace/all/summary_spec.rb +1 -1
  114. data/spec/terraspace/compiler/erb/render_spec.rb +15 -0
  115. data/spec/terraspace/dependency/helper/depends_on_spec.rb +27 -0
  116. data/spec/terraspace/dependency/helper/output_spec.rb +29 -0
  117. data/spec/terraspace/{terraform/hooks → hooks}/builder_spec.rb +4 -5
  118. data/spec/terraspace/terraform/remote_state/fetcher_spec.rb +108 -27
  119. data/spec/terraspace/terraform/remote_state/marker/output_spec.rb +36 -0
  120. data/spec/terraspace/terraform/remote_state/output_proxy_spec.rb +69 -0
  121. data/terraspace.gemspec +1 -1
  122. metadata +78 -13
  123. data/lib/terraspace/cli/help/log.md +0 -42
  124. data/lib/terraspace/cli/help/update.md +0 -5
  125. data/lib/terraspace/cli/log.rb +0 -112
  126. data/lib/terraspace/terraform/hooks/builder.rb +0 -40
@@ -68,7 +68,7 @@ describe Terraspace::All::Summary do
68
68
  let(:log_path) { "spec/fixtures/summary/output.log" }
69
69
  it "run" do
70
70
  summary.run
71
- expect(@io.string).to include "=> terraform output"
71
+ expect(@io.string).to include "pet1 = krill"
72
72
  end
73
73
  end
74
74
 
@@ -0,0 +1,15 @@
1
+ describe Terraspace::Compiler::Erb::Render do
2
+ let(:render) { described_class.new(mod, src_path) }
3
+ let(:mod) { Terraspace::Mod.new("a1") }
4
+
5
+ # Only testing mod unresolved as a sanity check and its worth the ROI.
6
+ # The resolved would the Fetcher. We have unit tests to cover those other changes.
7
+ context "a1" do
8
+ let(:src_path) { fixture("dependencies/app/stacks/a1/tfvars/dev.tfvars") }
9
+ it "build" do
10
+ allow(Terraspace::Terraform::RemoteState::Marker::Output).to receive(:stack_names).and_return("b1")
11
+ result = render.build
12
+ expect(result).to eq "length = (unresolved)"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,27 @@
1
+ describe Terraspace::Dependency::Helper::DependsOn do
2
+ let(:depends_on) do
3
+ described_class.new(mod, identifier, options)
4
+ end
5
+ let (:mod) { Terraspace::Mod.new("a1") }
6
+ # follow args dont matter for spec
7
+ let (:identifier) { "b1" }
8
+ let (:options) { {} }
9
+
10
+ context "unresolved" do
11
+ before(:each) { mod.resolved = false }
12
+ it "result calls Marker::Output" do
13
+ allow(Terraspace::Terraform::RemoteState::Marker::Output).to receive(:new).and_return(double(:marker_output).as_null_object)
14
+ result = depends_on.result
15
+ expect(result).to be_a(RSpec::Mocks::Double)
16
+ expect(result.instance_variable_get(:@name)).to eq :marker_output
17
+ end
18
+ end
19
+
20
+ context "resolved" do
21
+ before(:each) { mod.resolved = true }
22
+ it "return an raw String" do
23
+ result = depends_on.result
24
+ expect(result).to eq "# a1 depends on b1"
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,29 @@
1
+ describe Terraspace::Dependency::Helper::Output do
2
+ let(:output) do
3
+ described_class.new(mod, identifier, options)
4
+ end
5
+ let (:mod) { Terraspace::Mod.new("foo") }
6
+ # doesnt matter for spec
7
+ let (:identifier) { nil }
8
+ let (:options) { nil }
9
+
10
+ context "unresolved" do
11
+ before(:each) { mod.resolved = false }
12
+ it "result calls Marker::Output" do
13
+ allow(Terraspace::Terraform::RemoteState::Marker::Output).to receive(:new).and_return(double(:marker_output).as_null_object)
14
+ result = output.result
15
+ expect(result).to be_a(RSpec::Mocks::Double)
16
+ expect(result.instance_variable_get(:@name)).to eq :marker_output
17
+ end
18
+ end
19
+
20
+ context "resolved" do
21
+ before(:each) { mod.resolved = true }
22
+ it "result calls Fetcher" do
23
+ allow(Terraspace::Terraform::RemoteState::Fetcher).to receive(:new).and_return(double(:fetcher_output).as_null_object)
24
+ result = output.result
25
+ expect(result).to be_a(RSpec::Mocks::Double)
26
+ expect(result.instance_variable_get(:@name)).to eq :fetcher_output
27
+ end
28
+ end
29
+ end
@@ -1,7 +1,6 @@
1
- describe Terraspace::Terraform::Hooks::Builder do
1
+ describe Terraspace::Hooks::Builder do
2
2
  let(:builder) do
3
- builder = described_class.new(mod, name)
4
- builder.instance_variable_set(:@file, file) # override @file for spec
3
+ builder = described_class.new(mod, dsl_file, name)
5
4
  builder
6
5
  end
7
6
  let(:mod) do
@@ -11,7 +10,7 @@ describe Terraspace::Terraform::Hooks::Builder do
11
10
  end
12
11
 
13
12
  context "single" do
14
- let(:file) { fixture("terraform/hooks/single.rb") }
13
+ let(:dsl_file) { fixture("terraform/hooks/single.rb") }
15
14
  let(:name) { "apply" }
16
15
  it "build creates the @hooks structure" do
17
16
  hooks = builder.build
@@ -25,7 +24,7 @@ describe Terraspace::Terraform::Hooks::Builder do
25
24
  end
26
25
 
27
26
  context "multiple" do
28
- let(:file) { fixture("terraform/hooks/multiple.rb") }
27
+ let(:dsl_file) { fixture("terraform/hooks/multiple.rb") }
29
28
  let(:name) { "apply" }
30
29
  it "build creates the @hooks structure" do
31
30
  hooks = builder.build
@@ -11,41 +11,122 @@ describe Terraspace::Terraform::RemoteState::Fetcher do
11
11
  double("c1").as_null_object
12
12
  end
13
13
 
14
- context "pull success" do
15
- let(:state_path) { "spec/fixtures/fetcher/c1.json" }
16
- let(:pull_success) { true }
14
+ context "to_s uses to_json by default" do
15
+ context "pull success" do
16
+ let(:state_path) { "spec/fixtures/fetcher/c1.json" }
17
+ let(:pull_success) { true }
17
18
 
18
- context "c1.length" do
19
- let(:identifier) { "c1.length" }
20
- it "fetched found attribute" do
21
- expect(fetcher.output.raw).to eq 1 # matches spec/fixtures/fetcher/c1.json outputs.length.value
19
+ context "c1.length" do
20
+ let(:identifier) { "c1.length" }
21
+ it "fetched found attribute" do
22
+ expect(fetcher.output.to_s).to eq '1' # Integer as json matches spec/fixtures/fetcher/c1.json outputs.length.value
23
+ end
24
+ end
25
+
26
+ context "c1.complex" do
27
+ let(:identifier) { "c1.complex" }
28
+ it "fetched found attribute" do
29
+ expect(fetcher.output.to_s).to eq ["a","b"].to_json # matches spec/fixtures/fetcher/c1.json outputs.complex.value
30
+ end
31
+ end
32
+
33
+ context "c1.does-not-exist" do
34
+ let(:identifier) { "c1.does-not-exist" }
35
+ it "fetched missing output" do
36
+ output_proxy = fetcher.output
37
+ expect(output_proxy.raw).to be nil
38
+ value = output_proxy.to_s
39
+ # (Output length9 was not found for the b1 tfvars file. Either c1 stack has not been deployed yet or it does not have this output: length9)
40
+ expect(value).to include "not found"
41
+ end
22
42
  end
23
43
  end
24
44
 
25
- context "c1.does-not-exist" do
26
- let(:identifier) { "c1.does-not-exist" }
27
- it "fetched missing output" do
28
- output_proxy = fetcher.output
29
- expect(output_proxy.raw).to be nil
30
- # (Output length9 was not found for the b1 tfvars file. Either c1 stack has not been deployed yet or it does not have this output: length9)
31
- error = output_proxy.options[:error]
32
- expect(error).to include "not found"
45
+ context "pull fail" do
46
+ let(:state_path) { nil }
47
+ let(:pull_success) { false }
48
+
49
+ context "stack needs to be deployed" do
50
+ let(:identifier) { "c1.length" }
51
+ it "fetched" do
52
+ output_proxy = fetcher.output
53
+ expect(output_proxy.raw).to be nil
54
+ # (Output length could not be looked up for the b1 tfvars file. c1 stack needs to be deployed)
55
+ value = output_proxy.to_s
56
+ expect(value).to include "stack needs to be deployed"
57
+ end
58
+ end
59
+
60
+ context "bucket does not exist" do
61
+ let(:identifier) { "c1.length" }
62
+ it "fetched" do
63
+ fetcher.bucket_not_found_error # fake it!
64
+ output_proxy = fetcher.output
65
+ expect(output_proxy.raw).to be nil
66
+ # (Output length could not be looked up for the b1 tfvars file. c1 stack needs to be deployed)
67
+ value = output_proxy.to_s
68
+ expect(value).to include "bucket for the backend could not be found"
69
+ end
33
70
  end
34
71
  end
35
72
  end
36
73
 
37
- context "pull fail" do
38
- let(:state_path) { nil }
39
- let(:pull_success) { false }
40
-
41
- context "c1.length" do
42
- let(:identifier) { "c1.length" }
43
- it "fetched" do
44
- output_proxy = fetcher.output
45
- expect(output_proxy.raw).to be nil
46
- # (Output length could not be looked up for the b1 tfvars file. c1 stack needs to be deployed)
47
- error = output_proxy.options[:error]
48
- expect(error).to include "stack needs to be deployed"
74
+ context "to_ruby" do
75
+ context "pull success" do
76
+ let(:state_path) { "spec/fixtures/fetcher/c1.json" }
77
+ let(:pull_success) { true }
78
+
79
+ context "c1.length" do
80
+ let(:identifier) { "c1.length" }
81
+ it "fetched found attribute" do
82
+ expect(fetcher.output.to_ruby).to eq 1 # raw Integer
83
+ end
84
+ end
85
+
86
+ context "c1.complex" do
87
+ let(:identifier) { "c1.complex" }
88
+ it "fetched found attribute" do
89
+ expect(fetcher.output.to_ruby).to eq ["a","b"] # raw Array
90
+ end
91
+ end
92
+
93
+ context "c1.does-not-exist" do
94
+ let(:identifier) { "c1.does-not-exist" }
95
+ it "fetched missing output" do
96
+ output_proxy = fetcher.output
97
+ expect(output_proxy.raw).to be nil
98
+ value = output_proxy.to_ruby
99
+ # (Output length9 was not found for the b1 tfvars file. Either c1 stack has not been deployed yet or it does not have this output: length9)
100
+ expect(value).to include "not found"
101
+ end
102
+ end
103
+ end
104
+
105
+ context "pull fail" do
106
+ let(:state_path) { nil }
107
+ let(:pull_success) { false }
108
+
109
+ context "stack needs to be deployed" do
110
+ let(:identifier) { "c1.length" }
111
+ it "fetched" do
112
+ output_proxy = fetcher.output
113
+ expect(output_proxy.raw).to be nil
114
+ # (Output length could not be looked up for the b1 tfvars file. c1 stack needs to be deployed)
115
+ value = output_proxy.to_s
116
+ expect(value).to include "stack needs to be deployed"
117
+ end
118
+ end
119
+
120
+ context "bucket does not exist" do
121
+ let(:identifier) { "c1.length" }
122
+ it "fetched" do
123
+ fetcher.bucket_not_found_error # fake it!
124
+ output_proxy = fetcher.output
125
+ expect(output_proxy.raw).to be nil
126
+ # (Output length could not be looked up for the b1 tfvars file. c1 stack needs to be deployed)
127
+ value = output_proxy.to_s
128
+ expect(value).to include "bucket for the backend could not be found"
129
+ end
49
130
  end
50
131
  end
51
132
  end
@@ -0,0 +1,36 @@
1
+ describe Terraspace::Terraform::RemoteState::Marker::Output do
2
+ let(:output) do
3
+ output = described_class.new(mod, identifier, options)
4
+ allow(output).to receive(:warning) # supress warning messaging about missing child stack
5
+ output
6
+ end
7
+ let (:mod) { Terraspace::Mod.new("a1") }
8
+ let (:options) { {} }
9
+
10
+ before(:each) do
11
+ Terraspace::Dependency::Registry.class_variable_set("@@data", Set.new)
12
+ end
13
+
14
+ # markers are always only called during unresolved stage
15
+ context "child stack found" do
16
+ let(:identifier) { "b1.length" }
17
+ it "registers dependency and always return a OutputProxy" do
18
+ allow(output).to receive(:valid?).and_return(true) # child stack found
19
+ result = output.build
20
+ expect(result).to be_a(Terraspace::Terraform::RemoteState::OutputProxy)
21
+ set = Terraspace::Dependency::Registry.data
22
+ expect(set).not_to be_empty
23
+ end
24
+ end
25
+
26
+ context "child stack not found" do
27
+ let(:identifier) { "b1.length" }
28
+ it "does not registers dependency and always return a OutputProxy" do
29
+ allow(output).to receive(:valid?).and_return(false) # child stack not found
30
+ result = output.build
31
+ expect(result).to be_a(Terraspace::Terraform::RemoteState::OutputProxy)
32
+ set = Terraspace::Dependency::Registry.data
33
+ expect(set).to be_empty
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,69 @@
1
+ Unresolved = Terraspace::Terraform::RemoteState::Unresolved
2
+
3
+ describe Terraspace::Terraform::RemoteState::OutputProxy do
4
+ let(:proxy) do
5
+ described_class.new(mod, raw, options)
6
+ end
7
+ let (:mod) { Terraspace::Mod.new("foo") }
8
+ let (:raw) { nil }
9
+ let (:options) { {} }
10
+
11
+ context "unresolved" do
12
+ before(:each) { mod.resolved = false }
13
+ it "always return Unresolved" do
14
+ value = proxy.to_s
15
+ expect(value).to be_a(Unresolved)
16
+ expect(value.to_str).to eq "(unresolved)"
17
+ end
18
+ end
19
+
20
+ # Resolved value should always return a String because ERB requires string.
21
+ # Always use to_json.
22
+ context "resolved with mock" do
23
+ before(:each) { mod.resolved = true }
24
+ let (:raw) { nil }
25
+ let (:options) { {mock: "mock value"} }
26
+
27
+ it "return to_json String with mock value" do
28
+ value = proxy.to_s
29
+ expect(value).to be_a(String)
30
+ expect(value.to_str).to eq '"mock value"' # note double quotes from the to_json
31
+ end
32
+ end
33
+
34
+ context "resolved with errors" do
35
+ before(:each) { mod.resolved = true }
36
+ let (:raw) { nil }
37
+ let (:options) { {error: "error message"} }
38
+
39
+ it "return to_json String with error message" do
40
+ value = proxy.to_s
41
+ expect(value).to be_a(String)
42
+ expect(value.to_str).to eq '"error message"' # note double quotes from the to_json
43
+ end
44
+ end
45
+
46
+ context "to_ruby resolved with mock" do
47
+ before(:each) { mod.resolved = true }
48
+ let (:raw) { nil }
49
+ let (:options) { {mock: "mock value"} }
50
+
51
+ it "return to_json String with mock value" do
52
+ value = proxy.to_ruby
53
+ expect(value).to be_a(String)
54
+ expect(value.to_str).to eq "mock value"
55
+ end
56
+ end
57
+
58
+ context "to_ruby resolved with errors" do
59
+ before(:each) { mod.resolved = true }
60
+ let (:raw) { nil }
61
+ let (:options) { {error: "error message"} }
62
+
63
+ it "return to_json String with error message" do
64
+ value = proxy.to_ruby
65
+ expect(value).to be_a(String)
66
+ expect(value.to_str).to eq "error message"
67
+ end
68
+ end
69
+ end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency "memoist"
29
29
  spec.add_dependency "rainbow"
30
30
  spec.add_dependency "render_me_pretty"
31
- spec.add_dependency "terraspace-bundler", "~> 0.2.0"
31
+ spec.add_dependency "terraspace-bundler", "~> 0.3.0"
32
32
  spec.add_dependency "thor"
33
33
  spec.add_dependency "tty-tree"
34
34
  spec.add_dependency "zeitwerk"
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.3.2
4
+ version: 0.4.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: 2020-09-19 00:00:00.000000000 Z
11
+ date: 2020-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.2.0
159
+ version: 0.3.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.2.0
166
+ version: 0.3.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: thor
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -470,26 +470,70 @@ files:
470
470
  - lib/terraspace/cli/bundle.rb
471
471
  - lib/terraspace/cli/check_setup.rb
472
472
  - lib/terraspace/cli/clean.rb
473
+ - lib/terraspace/cli/clean/all.rb
474
+ - lib/terraspace/cli/clean/base.rb
475
+ - lib/terraspace/cli/clean/cache.rb
476
+ - lib/terraspace/cli/clean/logs.rb
473
477
  - lib/terraspace/cli/cloud.rb
474
478
  - lib/terraspace/cli/cloud/runs.rb
475
479
  - lib/terraspace/cli/commander.rb
476
480
  - lib/terraspace/cli/down.rb
477
481
  - lib/terraspace/cli/help.rb
482
+ - lib/terraspace/cli/help/all/down.md
483
+ - lib/terraspace/cli/help/all/graph.md
484
+ - lib/terraspace/cli/help/all/output.md
485
+ - lib/terraspace/cli/help/all/plan.md
486
+ - lib/terraspace/cli/help/all/providers.md
487
+ - lib/terraspace/cli/help/all/refresh.md
488
+ - lib/terraspace/cli/help/all/show.md
489
+ - lib/terraspace/cli/help/all/up.md
490
+ - lib/terraspace/cli/help/all/validate.md
491
+ - lib/terraspace/cli/help/build.md
478
492
  - lib/terraspace/cli/help/bundle.md
493
+ - lib/terraspace/cli/help/check_setup.md
494
+ - lib/terraspace/cli/help/clean/all.md
495
+ - lib/terraspace/cli/help/clean/cache.md
496
+ - lib/terraspace/cli/help/clean/logs.md
497
+ - lib/terraspace/cli/help/cloud/destroy.md
498
+ - lib/terraspace/cli/help/cloud/list.md
479
499
  - lib/terraspace/cli/help/cloud/runs/list.md
480
500
  - lib/terraspace/cli/help/cloud/runs/prune.md
481
501
  - lib/terraspace/cli/help/cloud/sync.md
482
502
  - lib/terraspace/cli/help/completion.md
483
503
  - lib/terraspace/cli/help/completion_script.md
484
- - lib/terraspace/cli/help/log.md
485
- - lib/terraspace/cli/help/update.md
504
+ - lib/terraspace/cli/help/console.md
505
+ - lib/terraspace/cli/help/down.md
506
+ - lib/terraspace/cli/help/info.md
507
+ - lib/terraspace/cli/help/init.md
508
+ - lib/terraspace/cli/help/list.md
509
+ - lib/terraspace/cli/help/logs.md
510
+ - lib/terraspace/cli/help/logs/remove.md
511
+ - lib/terraspace/cli/help/logs/truncate.md
512
+ - lib/terraspace/cli/help/new/bootstrap_test.md
513
+ - lib/terraspace/cli/help/new/example.md
514
+ - lib/terraspace/cli/help/new/git_hook.md
515
+ - lib/terraspace/cli/help/new/module.md
516
+ - lib/terraspace/cli/help/new/module_test.md
517
+ - lib/terraspace/cli/help/new/plugin.md
518
+ - lib/terraspace/cli/help/new/project.md
519
+ - lib/terraspace/cli/help/new/project_test.md
520
+ - lib/terraspace/cli/help/new/shim.md
521
+ - lib/terraspace/cli/help/new/stack.md
522
+ - lib/terraspace/cli/help/output.md
523
+ - lib/terraspace/cli/help/plan.md
524
+ - lib/terraspace/cli/help/providers.md
525
+ - lib/terraspace/cli/help/refresh.md
526
+ - lib/terraspace/cli/help/seed.md
527
+ - lib/terraspace/cli/help/show.md
528
+ - lib/terraspace/cli/help/summary.md
529
+ - lib/terraspace/cli/help/test.md
530
+ - lib/terraspace/cli/help/up.md
531
+ - lib/terraspace/cli/help/validate.md
486
532
  - lib/terraspace/cli/info.rb
487
533
  - lib/terraspace/cli/init.rb
488
534
  - lib/terraspace/cli/list.rb
489
- - lib/terraspace/cli/log.rb
490
- - lib/terraspace/cli/log/concern.rb
491
535
  - lib/terraspace/cli/logs.rb
492
- - lib/terraspace/cli/logs/tasks.rb
536
+ - lib/terraspace/cli/logs/concern.rb
493
537
  - lib/terraspace/cli/new.rb
494
538
  - lib/terraspace/cli/new/git_hook.rb
495
539
  - lib/terraspace/cli/new/helper.rb
@@ -520,6 +564,8 @@ files:
520
564
  - lib/terraspace/compiler/builder.rb
521
565
  - lib/terraspace/compiler/cleaner.rb
522
566
  - lib/terraspace/compiler/cleaner/backend_change.rb
567
+ - lib/terraspace/compiler/commands_concern.rb
568
+ - lib/terraspace/compiler/dependencies/helpers.rb
523
569
  - lib/terraspace/compiler/dirs_concern.rb
524
570
  - lib/terraspace/compiler/dsl/base.rb
525
571
  - lib/terraspace/compiler/dsl/meta/local.rb
@@ -540,6 +586,7 @@ files:
540
586
  - lib/terraspace/compiler/dsl/syntax/tfvar/common.rb
541
587
  - lib/terraspace/compiler/dsl/tfvars.rb
542
588
  - lib/terraspace/compiler/erb/context.rb
589
+ - lib/terraspace/compiler/erb/helpers.rb
543
590
  - lib/terraspace/compiler/erb/render.rb
544
591
  - lib/terraspace/compiler/expander.rb
545
592
  - lib/terraspace/compiler/strategy/abstract_base.rb
@@ -559,11 +606,18 @@ files:
559
606
  - lib/terraspace/completer/script.sh
560
607
  - lib/terraspace/core.rb
561
608
  - lib/terraspace/dependency/graph.rb
609
+ - lib/terraspace/dependency/helper/base.rb
610
+ - lib/terraspace/dependency/helper/depends_on.rb
611
+ - lib/terraspace/dependency/helper/output.rb
562
612
  - lib/terraspace/dependency/node.rb
563
613
  - lib/terraspace/dependency/registry.rb
564
614
  - lib/terraspace/ext.rb
565
615
  - lib/terraspace/ext/bundler.rb
566
616
  - lib/terraspace/ext/core/module.rb
617
+ - lib/terraspace/hooks/builder.rb
618
+ - lib/terraspace/hooks/concern.rb
619
+ - lib/terraspace/hooks/dsl.rb
620
+ - lib/terraspace/hooks/runner.rb
567
621
  - lib/terraspace/logger.rb
568
622
  - lib/terraspace/logger/formatter.rb
569
623
  - lib/terraspace/mod.rb
@@ -609,12 +663,11 @@ files:
609
663
  - lib/terraspace/terraform/cloud/sync.rb
610
664
  - lib/terraspace/terraform/cloud/syncer.rb
611
665
  - lib/terraspace/terraform/cloud/workspace.rb
612
- - lib/terraspace/terraform/hooks/builder.rb
613
- - lib/terraspace/terraform/hooks/dsl.rb
614
666
  - lib/terraspace/terraform/remote_state/fetcher.rb
615
667
  - lib/terraspace/terraform/remote_state/marker/output.rb
616
668
  - lib/terraspace/terraform/remote_state/marker/pretty_tracer.rb
617
669
  - lib/terraspace/terraform/remote_state/output_proxy.rb
670
+ - lib/terraspace/terraform/remote_state/unresolved.rb
618
671
  - lib/terraspace/terraform/runner.rb
619
672
  - lib/terraspace/tester.rb
620
673
  - lib/terraspace/tester/finder.rb
@@ -626,6 +679,7 @@ files:
626
679
  - lib/terraspace/version.rb
627
680
  - spec/cli_spec.rb
628
681
  - spec/fixtures/cache_dir/variables.tf
682
+ - spec/fixtures/dependencies/app/stacks/a1/tfvars/dev.tfvars
629
683
  - spec/fixtures/fetcher/c1.json
630
684
  - spec/fixtures/initialized/modules.json
631
685
  - spec/fixtures/orphans/config/backend.rb
@@ -739,13 +793,18 @@ files:
739
793
  - spec/terraspace/compiler/dsl/resource_spec.rb
740
794
  - spec/terraspace/compiler/dsl/terraform_spec.rb
741
795
  - spec/terraspace/compiler/dsl/variable_spec.rb
796
+ - spec/terraspace/compiler/erb/render_spec.rb
742
797
  - spec/terraspace/dependency/graph_spec.rb
798
+ - spec/terraspace/dependency/helper/depends_on_spec.rb
799
+ - spec/terraspace/dependency/helper/output_spec.rb
800
+ - spec/terraspace/hooks/builder_spec.rb
743
801
  - spec/terraspace/provider/expander/generic_spec.rb
744
802
  - spec/terraspace/seeder/content_spec.rb
745
803
  - spec/terraspace/seeder_spec.rb
746
804
  - spec/terraspace/terraform/args/custom_spec.rb
747
- - spec/terraspace/terraform/hooks/builder_spec.rb
748
805
  - spec/terraspace/terraform/remote_state/fetcher_spec.rb
806
+ - spec/terraspace/terraform/remote_state/marker/output_spec.rb
807
+ - spec/terraspace/terraform/remote_state/output_proxy_spec.rb
749
808
  - terraspace.gemspec
750
809
  homepage: https://github.com/boltops-tools/terraspace
751
810
  licenses:
@@ -773,6 +832,7 @@ summary: 'Terraspace: The Terraspace Framework'
773
832
  test_files:
774
833
  - spec/cli_spec.rb
775
834
  - spec/fixtures/cache_dir/variables.tf
835
+ - spec/fixtures/dependencies/app/stacks/a1/tfvars/dev.tfvars
776
836
  - spec/fixtures/fetcher/c1.json
777
837
  - spec/fixtures/initialized/modules.json
778
838
  - spec/fixtures/orphans/config/backend.rb
@@ -886,10 +946,15 @@ test_files:
886
946
  - spec/terraspace/compiler/dsl/resource_spec.rb
887
947
  - spec/terraspace/compiler/dsl/terraform_spec.rb
888
948
  - spec/terraspace/compiler/dsl/variable_spec.rb
949
+ - spec/terraspace/compiler/erb/render_spec.rb
889
950
  - spec/terraspace/dependency/graph_spec.rb
951
+ - spec/terraspace/dependency/helper/depends_on_spec.rb
952
+ - spec/terraspace/dependency/helper/output_spec.rb
953
+ - spec/terraspace/hooks/builder_spec.rb
890
954
  - spec/terraspace/provider/expander/generic_spec.rb
891
955
  - spec/terraspace/seeder/content_spec.rb
892
956
  - spec/terraspace/seeder_spec.rb
893
957
  - spec/terraspace/terraform/args/custom_spec.rb
894
- - spec/terraspace/terraform/hooks/builder_spec.rb
895
958
  - spec/terraspace/terraform/remote_state/fetcher_spec.rb
959
+ - spec/terraspace/terraform/remote_state/marker/output_spec.rb
960
+ - spec/terraspace/terraform/remote_state/output_proxy_spec.rb