terraspace 0.2.3 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/README.md +14 -1
- data/lib/templates/base/git_hook/hook.sh +1 -1
- data/lib/templates/base/project/.gitignore +1 -0
- data/lib/templates/base/project/README.md +17 -0
- data/lib/terraspace.rb +5 -0
- data/lib/terraspace/all/base.rb +8 -0
- data/lib/terraspace/all/grapher.rb +129 -0
- data/lib/terraspace/all/preview.rb +43 -0
- data/lib/terraspace/all/runner.rb +169 -0
- data/lib/terraspace/all/summary.rb +99 -0
- data/lib/terraspace/app.rb +31 -9
- data/lib/terraspace/booter.rb +9 -0
- data/lib/terraspace/builder.rb +59 -22
- data/lib/terraspace/cli.rb +39 -12
- data/lib/terraspace/cli/all.rb +63 -0
- data/lib/terraspace/cli/build/placeholder.rb +2 -5
- data/lib/terraspace/cli/bundle.rb +1 -1
- data/lib/terraspace/cli/check_setup.rb +17 -5
- data/lib/terraspace/cli/cloud.rb +18 -2
- data/lib/terraspace/cli/cloud/runs.rb +24 -0
- data/lib/terraspace/cli/commander.rb +1 -8
- data/lib/terraspace/cli/down.rb +20 -0
- data/lib/terraspace/cli/help/cloud/runs/list.md +36 -0
- data/lib/terraspace/cli/help/cloud/runs/prune.md +25 -0
- data/lib/terraspace/cli/help/cloud/sync.md +19 -0
- data/lib/terraspace/cli/help/log.md +46 -0
- data/lib/terraspace/cli/init.rb +35 -7
- data/lib/terraspace/cli/list.rb +14 -1
- data/lib/terraspace/cli/log.rb +112 -0
- data/lib/terraspace/cli/log/concern.rb +24 -0
- data/lib/terraspace/cli/logs.rb +15 -0
- data/lib/terraspace/cli/logs/tasks.rb +32 -0
- data/lib/terraspace/cli/new/git_hook.rb +1 -1
- data/lib/terraspace/cli/tfc_concern.rb +14 -0
- data/lib/terraspace/cli/up.rb +32 -0
- data/lib/terraspace/compiler/backend.rb +10 -0
- data/lib/terraspace/compiler/builder.rb +5 -4
- data/lib/terraspace/compiler/cleaner.rb +1 -1
- data/lib/terraspace/compiler/cleaner/backend_change.rb +21 -7
- data/lib/terraspace/compiler/commands_concern.rb +18 -0
- data/lib/terraspace/compiler/dirs_concern.rb +47 -0
- data/lib/terraspace/compiler/dsl/syntax/helpers/common.rb +26 -1
- data/lib/terraspace/core.rb +11 -2
- data/lib/terraspace/dependency/graph.rb +139 -0
- data/lib/terraspace/dependency/node.rb +38 -0
- data/lib/terraspace/dependency/registry.rb +11 -0
- data/lib/terraspace/logger.rb +6 -18
- data/lib/terraspace/logger/formatter.rb +13 -0
- data/lib/terraspace/mod.rb +7 -1
- data/lib/terraspace/seeder/where.rb +6 -2
- data/lib/terraspace/shell.rb +97 -0
- data/lib/terraspace/terraform/api.rb +7 -45
- data/lib/terraspace/terraform/api/base.rb +7 -0
- data/lib/terraspace/terraform/api/client.rb +23 -3
- data/lib/terraspace/terraform/api/http.rb +14 -34
- data/lib/terraspace/terraform/api/http/concern.rb +10 -0
- data/lib/terraspace/terraform/api/runs.rb +28 -0
- data/lib/terraspace/terraform/api/token.rb +65 -0
- data/lib/terraspace/terraform/api/var.rb +20 -6
- data/lib/terraspace/terraform/api/vars.rb +2 -1
- data/lib/terraspace/terraform/api/workspace.rb +98 -0
- data/lib/terraspace/terraform/args/default.rb +48 -21
- data/lib/terraspace/terraform/cloud/runs.rb +13 -0
- data/lib/terraspace/terraform/cloud/runs/base.rb +33 -0
- data/lib/terraspace/terraform/cloud/runs/item_presenter.rb +37 -0
- data/lib/terraspace/terraform/cloud/runs/lister.rb +22 -0
- data/lib/terraspace/terraform/cloud/runs/pruner.rb +109 -0
- data/lib/terraspace/terraform/cloud/sync.rb +41 -0
- data/lib/terraspace/terraform/cloud/syncer.rb +52 -0
- data/lib/terraspace/terraform/cloud/workspace.rb +10 -21
- data/lib/terraspace/terraform/hooks/builder.rb +1 -1
- data/lib/terraspace/terraform/remote_state/fetcher.rb +143 -0
- data/lib/terraspace/terraform/remote_state/marker/output.rb +39 -0
- data/lib/terraspace/terraform/remote_state/marker/pretty_tracer.rb +37 -0
- data/lib/terraspace/terraform/remote_state/output_proxy.rb +29 -0
- data/lib/terraspace/terraform/runner.rb +24 -14
- data/lib/terraspace/util.rb +1 -5
- data/lib/terraspace/util/pretty.rb +18 -0
- data/lib/terraspace/version.rb +1 -1
- data/spec/fixtures/fetcher/c1.json +37 -0
- data/spec/fixtures/parser/cache_dirs/all/01-test.auto.tfvars +5 -0
- data/spec/fixtures/parser/cache_dirs/depends_on/01-test.auto.tfvars +2 -0
- data/spec/fixtures/parser/cache_dirs/output/01-test.auto.tfvars +2 -0
- data/spec/fixtures/summary/down.log +12 -0
- data/spec/fixtures/summary/output.log +5 -0
- data/spec/fixtures/summary/plan/error.log +20 -0
- data/spec/fixtures/summary/plan/success.log +17 -0
- data/spec/fixtures/summary/show.log +22 -0
- data/spec/fixtures/summary/up/error.log +13 -0
- data/spec/fixtures/summary/up/success.log +63 -0
- data/spec/fixtures/summary/validate/error.log +13 -0
- data/spec/fixtures/summary/validate/success.log +5 -0
- data/spec/terraspace/all/grapher_spec.rb +38 -0
- data/spec/terraspace/all/runner_spec.rb +48 -0
- data/spec/terraspace/all/summary_spec.rb +93 -0
- data/spec/terraspace/dependency/graph_spec.rb +162 -0
- data/spec/terraspace/seeder_spec.rb +0 -1
- data/spec/terraspace/terraform/remote_state/fetcher_spec.rb +52 -0
- data/terraspace.gemspec +5 -1
- metadata +138 -5
- data/lib/terraspace/terraform/cloud.rb +0 -25
- data/lib/terraspace/util/sh.rb +0 -19
@@ -0,0 +1,48 @@
|
|
1
|
+
describe Terraspace::All::Runner do
|
2
|
+
let(:runner) do
|
3
|
+
runner = described_class.new(command: "up", yes: true)
|
4
|
+
allow(runner).to receive(:build_batches).and_return(batches)
|
5
|
+
allow(runner).to receive(:preview)
|
6
|
+
# Just test to the point of the run_builder and deploy_batch
|
7
|
+
allow(runner).to receive(:run_builder)
|
8
|
+
allow(runner).to receive(:deploy_batch)
|
9
|
+
# Take over logger
|
10
|
+
allow(runner).to receive(:logger).and_return(logger)
|
11
|
+
runner
|
12
|
+
end
|
13
|
+
# To capture logger output for testing
|
14
|
+
let(:logger) do
|
15
|
+
@io = StringIO.new
|
16
|
+
Logger.new(@io)
|
17
|
+
end
|
18
|
+
|
19
|
+
context "simple batches" do
|
20
|
+
let(:batches) do
|
21
|
+
[
|
22
|
+
set("c1"),
|
23
|
+
set("b2", "b1"),
|
24
|
+
set("a1"),
|
25
|
+
]
|
26
|
+
end
|
27
|
+
it "run" do
|
28
|
+
runner.run
|
29
|
+
expect(@io.string).to include "Batch Run 1"
|
30
|
+
expect(@io.string).to include "Batch Run 2"
|
31
|
+
expect(@io.string).to include "Batch Run 3"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context "empty batches" do
|
36
|
+
let(:batches) { [] }
|
37
|
+
it "run" do
|
38
|
+
runner.run
|
39
|
+
expect(@io.string).to include "Time took" # just a sanity syntax check. dont think can really get here
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
Node = Terraspace::Dependency::Node
|
44
|
+
def set(*items)
|
45
|
+
nodes = items.map { |i| Node.new(i) }
|
46
|
+
Set.new(nodes)
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
describe Terraspace::All::Summary do
|
2
|
+
let(:summary) do
|
3
|
+
summary = described_class.new(data)
|
4
|
+
allow(summary).to receive(:logger).and_return(logger)
|
5
|
+
summary
|
6
|
+
end
|
7
|
+
# To capture logger output for testing
|
8
|
+
let(:logger) do
|
9
|
+
@io = StringIO.new
|
10
|
+
Logger.new(@io)
|
11
|
+
end
|
12
|
+
let(:data) do
|
13
|
+
{
|
14
|
+
command: command,
|
15
|
+
log_path: log_path,
|
16
|
+
terraspace_command: "fake-terrraspace-commands",
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
context "terraspace up success" do
|
21
|
+
let(:command) { "up" }
|
22
|
+
let(:log_path) { "spec/fixtures/summary/up/success.log" }
|
23
|
+
it "run" do
|
24
|
+
summary.run
|
25
|
+
expect(@io.string).to include "Resources: 2 added, 0 changed, 0 destroyed"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "terraspace up error" do
|
30
|
+
let(:command) { "up" }
|
31
|
+
let(:log_path) { "spec/fixtures/summary/up/error.log" }
|
32
|
+
it "run" do
|
33
|
+
summary.run
|
34
|
+
expect(@io.string).to include "Error"
|
35
|
+
expect(@io.string).to include "Unsupported attribute"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
context "terraspace down" do
|
39
|
+
let(:command) { "down" }
|
40
|
+
let(:log_path) { "spec/fixtures/summary/down.log" }
|
41
|
+
it "run" do
|
42
|
+
summary.run
|
43
|
+
expect(@io.string).to include "Destroy complete! Resources: 2 destroyed"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context "terraspace plan error" do
|
48
|
+
let(:command) { "plan" }
|
49
|
+
let(:log_path) { "spec/fixtures/summary/plan/error.log" }
|
50
|
+
it "run" do
|
51
|
+
summary.run
|
52
|
+
expect(@io.string).to include "Error"
|
53
|
+
expect(@io.string).to include "Unbalanced parentheses"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
context "terraspace plan success" do
|
58
|
+
let(:command) { "plan" }
|
59
|
+
let(:log_path) { "spec/fixtures/summary/plan/success.log" }
|
60
|
+
it "run" do
|
61
|
+
summary.run
|
62
|
+
expect(@io.string).to include "No changes. Infrastructure is up-to-date"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context "terraspace output" do
|
67
|
+
let(:command) { "output" }
|
68
|
+
let(:log_path) { "spec/fixtures/summary/output.log" }
|
69
|
+
it "run" do
|
70
|
+
summary.run
|
71
|
+
expect(@io.string).to include "=> terraform output"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
context "terraspace show" do
|
76
|
+
let(:command) { "show" }
|
77
|
+
let(:log_path) { "spec/fixtures/summary/show.log" }
|
78
|
+
it "run" do
|
79
|
+
summary.run
|
80
|
+
expect(@io.string).to include "Resources: 2 Outputs: 2"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
context "terraspace validate error" do
|
85
|
+
let(:command) { "validate" }
|
86
|
+
let(:log_path) { "spec/fixtures/summary/validate/error.log" }
|
87
|
+
it "run" do
|
88
|
+
summary.run
|
89
|
+
expect(@io.string).to include "Error"
|
90
|
+
expect(@io.string).to include "Unsupported attribute"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,162 @@
|
|
1
|
+
describe Terraspace::Dependency::Graph do
|
2
|
+
let(:graph) { described_class.new(stack_names, dependencies, options) }
|
3
|
+
let(:options) { {} }
|
4
|
+
|
5
|
+
context "simple" do
|
6
|
+
let(:stack_names) { ["a1", "b2", "b1", "c1"] }
|
7
|
+
let(:dependencies) do
|
8
|
+
["a1:b1", "b1:c1","a1:b1", "a1:b2", "a1:b1", "b2:c1"]
|
9
|
+
end
|
10
|
+
it "build" do
|
11
|
+
batches = normalize(graph.build)
|
12
|
+
# └── a1
|
13
|
+
# ├── b1
|
14
|
+
# │ └── c1
|
15
|
+
# └── b2
|
16
|
+
# └── c1
|
17
|
+
expect(batches).to eq(
|
18
|
+
[
|
19
|
+
["c1"],
|
20
|
+
["b1", "b2"],
|
21
|
+
["a1"]
|
22
|
+
]
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context "complex" do
|
28
|
+
let(:stack_names) { ["a1", "b4", "a2", "b2", "e1", "b1", "b3", "a3", "c1", "c3", "d1", "c2"] }
|
29
|
+
let(:dependencies) do
|
30
|
+
["a1:b1",
|
31
|
+
"a1:b2",
|
32
|
+
"a1:b1",
|
33
|
+
"a2:c1",
|
34
|
+
"a2:b3",
|
35
|
+
"b2:c1",
|
36
|
+
"b2:c2",
|
37
|
+
"b1:c1",
|
38
|
+
"b3:c3",
|
39
|
+
"d1:e1",
|
40
|
+
"c2:d1"]
|
41
|
+
end
|
42
|
+
it "build" do
|
43
|
+
batches = normalize(graph.build)
|
44
|
+
# ├── a1
|
45
|
+
# │ ├── b1
|
46
|
+
# │ │ └── c1
|
47
|
+
# │ └── b2
|
48
|
+
# │ ├── c1
|
49
|
+
# │ └── c2
|
50
|
+
# │ └── d1
|
51
|
+
# │ └── e1
|
52
|
+
# ├── a2
|
53
|
+
# │ ├── c1
|
54
|
+
# │ └── b3
|
55
|
+
# │ └── c3
|
56
|
+
# ├── a3
|
57
|
+
# └── b4
|
58
|
+
expect(batches).to eq(
|
59
|
+
[
|
60
|
+
["a3", "b4", "c1", "c3", "e1"],
|
61
|
+
["b1", "b3", "d1"],
|
62
|
+
["a2", "c2"],
|
63
|
+
["b2"],
|
64
|
+
["a1"]
|
65
|
+
]
|
66
|
+
)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
context "complex filter single node" do
|
71
|
+
let(:stack_names) { ["a1", "b4", "a2", "b2", "e1", "b1", "b3", "a3", "c1", "c3", "d1", "c2"] }
|
72
|
+
let(:dependencies) do
|
73
|
+
["a1:b1",
|
74
|
+
"a1:b2",
|
75
|
+
"a1:b1",
|
76
|
+
"a2:c1",
|
77
|
+
"a2:b3",
|
78
|
+
"b2:c1",
|
79
|
+
"b2:c2",
|
80
|
+
"b1:c1",
|
81
|
+
"b3:c3",
|
82
|
+
"d1:e1",
|
83
|
+
"c2:d1"]
|
84
|
+
end
|
85
|
+
let(:options) { {stacks: ["a2"] } }
|
86
|
+
it "build" do
|
87
|
+
batches = normalize(graph.build)
|
88
|
+
# ├── a1
|
89
|
+
# │ ├── b1
|
90
|
+
# │ │ └── c1
|
91
|
+
# │ └── b2
|
92
|
+
# │ ├── c1
|
93
|
+
# │ └── c2
|
94
|
+
# │ └── d1
|
95
|
+
# │ └── e1
|
96
|
+
# ├── a2 <= only this part of tree used
|
97
|
+
# │ ├── c1
|
98
|
+
# │ └── b3
|
99
|
+
# │ └── c3
|
100
|
+
# ├── a3
|
101
|
+
# └── b4
|
102
|
+
expect(batches).to eq(
|
103
|
+
[
|
104
|
+
["c1", "c3"],
|
105
|
+
["b3"],
|
106
|
+
["a2"],
|
107
|
+
]
|
108
|
+
)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
context "complex filter multiple nodes" do
|
113
|
+
let(:stack_names) { ["a1", "b4", "a2", "b2", "e1", "b1", "b3", "a3", "c1", "c3", "d1", "c2"] }
|
114
|
+
let(:dependencies) do
|
115
|
+
["a1:b1",
|
116
|
+
"a1:b2",
|
117
|
+
"a1:b1",
|
118
|
+
"a2:c1",
|
119
|
+
"a2:b3",
|
120
|
+
"b2:c1",
|
121
|
+
"b2:c2",
|
122
|
+
"b1:c1",
|
123
|
+
"b3:c3",
|
124
|
+
"d1:e1",
|
125
|
+
"c2:d1"]
|
126
|
+
end
|
127
|
+
let(:options) { {stacks: ["b1", "a2"] } }
|
128
|
+
it "build" do
|
129
|
+
batches = normalize(graph.build)
|
130
|
+
# ├── a1
|
131
|
+
# │ ├── b1 <= this part of tree used
|
132
|
+
# │ │ └── c1
|
133
|
+
# │ └── b2
|
134
|
+
# │ ├── c1
|
135
|
+
# │ └── c2
|
136
|
+
# │ └── d1
|
137
|
+
# │ └── e1
|
138
|
+
# ├── a2 <= this part of tree used
|
139
|
+
# │ ├── c1
|
140
|
+
# │ └── b3
|
141
|
+
# │ └── c3
|
142
|
+
# ├── a3
|
143
|
+
# └── b4
|
144
|
+
expect(batches).to eq(
|
145
|
+
[
|
146
|
+
["c1", "c3"],
|
147
|
+
["b1", "b3"],
|
148
|
+
["a2"]
|
149
|
+
]
|
150
|
+
)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
# Changes batches
|
155
|
+
# from: Array of Sets with Nodes
|
156
|
+
# to: Array of Arrays with Strings
|
157
|
+
def normalize(batches)
|
158
|
+
batches.map(&:to_a).map do |batch|
|
159
|
+
batch.map(&:name)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
describe Terraspace::Terraform::RemoteState::Fetcher do
|
2
|
+
let(:fetcher) do
|
3
|
+
fetcher = described_class.new(parent, identifier)
|
4
|
+
allow(fetcher).to receive(:validate!)
|
5
|
+
allow(fetcher).to receive(:pull)
|
6
|
+
allow(fetcher).to receive(:state_path).and_return(state_path)
|
7
|
+
allow(fetcher).to receive(:pull_success?).and_return(pull_success)
|
8
|
+
fetcher
|
9
|
+
end
|
10
|
+
let(:parent) do
|
11
|
+
double("c1").as_null_object
|
12
|
+
end
|
13
|
+
|
14
|
+
context "pull success" do
|
15
|
+
let(:state_path) { "spec/fixtures/fetcher/c1.json" }
|
16
|
+
let(:pull_success) { true }
|
17
|
+
|
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
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
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"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
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"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/terraspace.gemspec
CHANGED
@@ -20,13 +20,17 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency "activesupport"
|
22
22
|
spec.add_dependency "cli-format"
|
23
|
+
spec.add_dependency "deep_merge"
|
23
24
|
spec.add_dependency "dsl_evaluator"
|
25
|
+
spec.add_dependency "eventmachine-tail"
|
26
|
+
spec.add_dependency "graph"
|
24
27
|
spec.add_dependency "hcl_parser"
|
25
28
|
spec.add_dependency "memoist"
|
26
29
|
spec.add_dependency "rainbow"
|
27
30
|
spec.add_dependency "render_me_pretty"
|
28
|
-
spec.add_dependency "terraspace-bundler"
|
31
|
+
spec.add_dependency "terraspace-bundler", "~> 0.2.0"
|
29
32
|
spec.add_dependency "thor"
|
33
|
+
spec.add_dependency "tty-tree"
|
30
34
|
spec.add_dependency "zeitwerk"
|
31
35
|
|
32
36
|
# core baseline plugins
|
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.3.3
|
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-
|
11
|
+
date: 2020-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: deep_merge
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: dsl_evaluator
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,34 @@ dependencies:
|
|
52
66
|
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: eventmachine-tail
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: graph
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
55
97
|
- !ruby/object:Gem::Dependency
|
56
98
|
name: hcl_parser
|
57
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,6 +152,20 @@ dependencies:
|
|
110
152
|
version: '0'
|
111
153
|
- !ruby/object:Gem::Dependency
|
112
154
|
name: terraspace-bundler
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.2.0
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.2.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: thor
|
113
169
|
requirement: !ruby/object:Gem::Requirement
|
114
170
|
requirements:
|
115
171
|
- - ">="
|
@@ -123,7 +179,7 @@ dependencies:
|
|
123
179
|
- !ruby/object:Gem::Version
|
124
180
|
version: '0'
|
125
181
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
182
|
+
name: tty-tree
|
127
183
|
requirement: !ruby/object:Gem::Requirement
|
128
184
|
requirements:
|
129
185
|
- - ">="
|
@@ -332,6 +388,7 @@ files:
|
|
332
388
|
- lib/templates/base/git_hook/hook.sh
|
333
389
|
- lib/templates/base/project/.gitignore
|
334
390
|
- lib/templates/base/project/Gemfile.tt
|
391
|
+
- lib/templates/base/project/README.md
|
335
392
|
- lib/templates/base/project/Terrafile
|
336
393
|
- lib/templates/base/project/config/app.rb
|
337
394
|
- lib/templates/base/shim/terraspace
|
@@ -395,6 +452,11 @@ files:
|
|
395
452
|
- lib/templates/ruby/stack/outputs.rb
|
396
453
|
- lib/templates/ruby/stack/variables.rb
|
397
454
|
- lib/terraspace.rb
|
455
|
+
- lib/terraspace/all/base.rb
|
456
|
+
- lib/terraspace/all/grapher.rb
|
457
|
+
- lib/terraspace/all/preview.rb
|
458
|
+
- lib/terraspace/all/runner.rb
|
459
|
+
- lib/terraspace/all/summary.rb
|
398
460
|
- lib/terraspace/app.rb
|
399
461
|
- lib/terraspace/app/hooks.rb
|
400
462
|
- lib/terraspace/autoloader.rb
|
@@ -402,21 +464,32 @@ files:
|
|
402
464
|
- lib/terraspace/builder.rb
|
403
465
|
- lib/terraspace/bundle.rb
|
404
466
|
- lib/terraspace/cli.rb
|
467
|
+
- lib/terraspace/cli/all.rb
|
405
468
|
- lib/terraspace/cli/base.rb
|
406
469
|
- lib/terraspace/cli/build/placeholder.rb
|
407
470
|
- lib/terraspace/cli/bundle.rb
|
408
471
|
- lib/terraspace/cli/check_setup.rb
|
409
472
|
- lib/terraspace/cli/clean.rb
|
410
473
|
- lib/terraspace/cli/cloud.rb
|
474
|
+
- lib/terraspace/cli/cloud/runs.rb
|
411
475
|
- lib/terraspace/cli/commander.rb
|
476
|
+
- lib/terraspace/cli/down.rb
|
412
477
|
- lib/terraspace/cli/help.rb
|
413
478
|
- lib/terraspace/cli/help/bundle.md
|
479
|
+
- lib/terraspace/cli/help/cloud/runs/list.md
|
480
|
+
- lib/terraspace/cli/help/cloud/runs/prune.md
|
481
|
+
- lib/terraspace/cli/help/cloud/sync.md
|
414
482
|
- lib/terraspace/cli/help/completion.md
|
415
483
|
- lib/terraspace/cli/help/completion_script.md
|
484
|
+
- lib/terraspace/cli/help/log.md
|
416
485
|
- lib/terraspace/cli/help/update.md
|
417
486
|
- lib/terraspace/cli/info.rb
|
418
487
|
- lib/terraspace/cli/init.rb
|
419
488
|
- lib/terraspace/cli/list.rb
|
489
|
+
- lib/terraspace/cli/log.rb
|
490
|
+
- lib/terraspace/cli/log/concern.rb
|
491
|
+
- lib/terraspace/cli/logs.rb
|
492
|
+
- lib/terraspace/cli/logs/tasks.rb
|
420
493
|
- lib/terraspace/cli/new.rb
|
421
494
|
- lib/terraspace/cli/new/git_hook.rb
|
422
495
|
- lib/terraspace/cli/new/helper.rb
|
@@ -438,6 +511,8 @@ files:
|
|
438
511
|
- lib/terraspace/cli/seed.rb
|
439
512
|
- lib/terraspace/cli/summary.rb
|
440
513
|
- lib/terraspace/cli/test.rb
|
514
|
+
- lib/terraspace/cli/tfc_concern.rb
|
515
|
+
- lib/terraspace/cli/up.rb
|
441
516
|
- lib/terraspace/command.rb
|
442
517
|
- lib/terraspace/compiler/backend.rb
|
443
518
|
- lib/terraspace/compiler/backend/parser.rb
|
@@ -445,6 +520,8 @@ files:
|
|
445
520
|
- lib/terraspace/compiler/builder.rb
|
446
521
|
- lib/terraspace/compiler/cleaner.rb
|
447
522
|
- lib/terraspace/compiler/cleaner/backend_change.rb
|
523
|
+
- lib/terraspace/compiler/commands_concern.rb
|
524
|
+
- lib/terraspace/compiler/dirs_concern.rb
|
448
525
|
- lib/terraspace/compiler/dsl/base.rb
|
449
526
|
- lib/terraspace/compiler/dsl/meta/local.rb
|
450
527
|
- lib/terraspace/compiler/dsl/meta/var.rb
|
@@ -482,10 +559,14 @@ files:
|
|
482
559
|
- lib/terraspace/completer/script.rb
|
483
560
|
- lib/terraspace/completer/script.sh
|
484
561
|
- lib/terraspace/core.rb
|
562
|
+
- lib/terraspace/dependency/graph.rb
|
563
|
+
- lib/terraspace/dependency/node.rb
|
564
|
+
- lib/terraspace/dependency/registry.rb
|
485
565
|
- lib/terraspace/ext.rb
|
486
566
|
- lib/terraspace/ext/bundler.rb
|
487
567
|
- lib/terraspace/ext/core/module.rb
|
488
568
|
- lib/terraspace/logger.rb
|
569
|
+
- lib/terraspace/logger/formatter.rb
|
489
570
|
- lib/terraspace/mod.rb
|
490
571
|
- lib/terraspace/mod/remote.rb
|
491
572
|
- lib/terraspace/plugin.rb
|
@@ -503,33 +584,50 @@ files:
|
|
503
584
|
- lib/terraspace/seeder/actions.rb
|
504
585
|
- lib/terraspace/seeder/content.rb
|
505
586
|
- lib/terraspace/seeder/where.rb
|
587
|
+
- lib/terraspace/shell.rb
|
506
588
|
- lib/terraspace/terraform/api.rb
|
589
|
+
- lib/terraspace/terraform/api/base.rb
|
507
590
|
- lib/terraspace/terraform/api/client.rb
|
508
591
|
- lib/terraspace/terraform/api/http.rb
|
592
|
+
- lib/terraspace/terraform/api/http/concern.rb
|
593
|
+
- lib/terraspace/terraform/api/runs.rb
|
594
|
+
- lib/terraspace/terraform/api/token.rb
|
509
595
|
- lib/terraspace/terraform/api/var.rb
|
510
596
|
- lib/terraspace/terraform/api/vars.rb
|
511
597
|
- lib/terraspace/terraform/api/vars/base.rb
|
512
598
|
- lib/terraspace/terraform/api/vars/json.rb
|
513
599
|
- lib/terraspace/terraform/api/vars/rb.rb
|
600
|
+
- lib/terraspace/terraform/api/workspace.rb
|
514
601
|
- lib/terraspace/terraform/args/custom.rb
|
515
602
|
- lib/terraspace/terraform/args/default.rb
|
516
603
|
- lib/terraspace/terraform/args/dsl.rb
|
517
604
|
- lib/terraspace/terraform/args/shorthands.rb
|
518
|
-
- lib/terraspace/terraform/cloud.rb
|
605
|
+
- lib/terraspace/terraform/cloud/runs.rb
|
606
|
+
- lib/terraspace/terraform/cloud/runs/base.rb
|
607
|
+
- lib/terraspace/terraform/cloud/runs/item_presenter.rb
|
608
|
+
- lib/terraspace/terraform/cloud/runs/lister.rb
|
609
|
+
- lib/terraspace/terraform/cloud/runs/pruner.rb
|
610
|
+
- lib/terraspace/terraform/cloud/sync.rb
|
611
|
+
- lib/terraspace/terraform/cloud/syncer.rb
|
519
612
|
- lib/terraspace/terraform/cloud/workspace.rb
|
520
613
|
- lib/terraspace/terraform/hooks/builder.rb
|
521
614
|
- lib/terraspace/terraform/hooks/dsl.rb
|
615
|
+
- lib/terraspace/terraform/remote_state/fetcher.rb
|
616
|
+
- lib/terraspace/terraform/remote_state/marker/output.rb
|
617
|
+
- lib/terraspace/terraform/remote_state/marker/pretty_tracer.rb
|
618
|
+
- lib/terraspace/terraform/remote_state/output_proxy.rb
|
522
619
|
- lib/terraspace/terraform/runner.rb
|
523
620
|
- lib/terraspace/tester.rb
|
524
621
|
- lib/terraspace/tester/finder.rb
|
525
622
|
- lib/terraspace/tester/meta.rb
|
526
623
|
- lib/terraspace/util.rb
|
527
624
|
- lib/terraspace/util/logging.rb
|
528
|
-
- lib/terraspace/util/
|
625
|
+
- lib/terraspace/util/pretty.rb
|
529
626
|
- lib/terraspace/util/sure.rb
|
530
627
|
- lib/terraspace/version.rb
|
531
628
|
- spec/cli_spec.rb
|
532
629
|
- spec/fixtures/cache_dir/variables.tf
|
630
|
+
- spec/fixtures/fetcher/c1.json
|
533
631
|
- spec/fixtures/initialized/modules.json
|
534
632
|
- spec/fixtures/orphans/config/backend.rb
|
535
633
|
- spec/fixtures/orphans/config/provider.rb
|
@@ -543,6 +641,9 @@ files:
|
|
543
641
|
- spec/fixtures/orphans/resource/security_group/hash_example.rb
|
544
642
|
- spec/fixtures/orphans/resource/vpc/count_example.rb
|
545
643
|
- spec/fixtures/orphans/terraform/terraform.rb
|
644
|
+
- spec/fixtures/parser/cache_dirs/all/01-test.auto.tfvars
|
645
|
+
- spec/fixtures/parser/cache_dirs/depends_on/01-test.auto.tfvars
|
646
|
+
- spec/fixtures/parser/cache_dirs/output/01-test.auto.tfvars
|
546
647
|
- spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
|
547
648
|
- spec/fixtures/projects/hcl/aws/app/modules/instance/variables.tf
|
548
649
|
- spec/fixtures/projects/hcl/aws/app/modules/vpc/file.txt
|
@@ -609,11 +710,23 @@ files:
|
|
609
710
|
- spec/fixtures/projects/ruby/google/app/stacks/core/main.rb
|
610
711
|
- spec/fixtures/projects/ruby/google/config/backend.rb
|
611
712
|
- spec/fixtures/projects/ruby/google/config/provider.rb
|
713
|
+
- spec/fixtures/summary/down.log
|
714
|
+
- spec/fixtures/summary/output.log
|
715
|
+
- spec/fixtures/summary/plan/error.log
|
716
|
+
- spec/fixtures/summary/plan/success.log
|
717
|
+
- spec/fixtures/summary/show.log
|
718
|
+
- spec/fixtures/summary/up/error.log
|
719
|
+
- spec/fixtures/summary/up/success.log
|
720
|
+
- spec/fixtures/summary/validate/error.log
|
721
|
+
- spec/fixtures/summary/validate/success.log
|
612
722
|
- spec/fixtures/terraform/args/multiple.rb
|
613
723
|
- spec/fixtures/terraform/args/single.rb
|
614
724
|
- spec/fixtures/terraform/hooks/multiple.rb
|
615
725
|
- spec/fixtures/terraform/hooks/single.rb
|
616
726
|
- spec/spec_helper.rb
|
727
|
+
- spec/terraspace/all/grapher_spec.rb
|
728
|
+
- spec/terraspace/all/runner_spec.rb
|
729
|
+
- spec/terraspace/all/summary_spec.rb
|
617
730
|
- spec/terraspace/compiler/dsl/backend_spec.rb
|
618
731
|
- spec/terraspace/compiler/dsl/data_spec.rb
|
619
732
|
- spec/terraspace/compiler/dsl/locals_spec.rb
|
@@ -627,11 +740,13 @@ files:
|
|
627
740
|
- spec/terraspace/compiler/dsl/resource_spec.rb
|
628
741
|
- spec/terraspace/compiler/dsl/terraform_spec.rb
|
629
742
|
- spec/terraspace/compiler/dsl/variable_spec.rb
|
743
|
+
- spec/terraspace/dependency/graph_spec.rb
|
630
744
|
- spec/terraspace/provider/expander/generic_spec.rb
|
631
745
|
- spec/terraspace/seeder/content_spec.rb
|
632
746
|
- spec/terraspace/seeder_spec.rb
|
633
747
|
- spec/terraspace/terraform/args/custom_spec.rb
|
634
748
|
- spec/terraspace/terraform/hooks/builder_spec.rb
|
749
|
+
- spec/terraspace/terraform/remote_state/fetcher_spec.rb
|
635
750
|
- terraspace.gemspec
|
636
751
|
homepage: https://github.com/boltops-tools/terraspace
|
637
752
|
licenses:
|
@@ -659,6 +774,7 @@ summary: 'Terraspace: The Terraspace Framework'
|
|
659
774
|
test_files:
|
660
775
|
- spec/cli_spec.rb
|
661
776
|
- spec/fixtures/cache_dir/variables.tf
|
777
|
+
- spec/fixtures/fetcher/c1.json
|
662
778
|
- spec/fixtures/initialized/modules.json
|
663
779
|
- spec/fixtures/orphans/config/backend.rb
|
664
780
|
- spec/fixtures/orphans/config/provider.rb
|
@@ -672,6 +788,9 @@ test_files:
|
|
672
788
|
- spec/fixtures/orphans/resource/security_group/hash_example.rb
|
673
789
|
- spec/fixtures/orphans/resource/vpc/count_example.rb
|
674
790
|
- spec/fixtures/orphans/terraform/terraform.rb
|
791
|
+
- spec/fixtures/parser/cache_dirs/all/01-test.auto.tfvars
|
792
|
+
- spec/fixtures/parser/cache_dirs/depends_on/01-test.auto.tfvars
|
793
|
+
- spec/fixtures/parser/cache_dirs/output/01-test.auto.tfvars
|
675
794
|
- spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
|
676
795
|
- spec/fixtures/projects/hcl/aws/app/modules/instance/variables.tf
|
677
796
|
- spec/fixtures/projects/hcl/aws/app/modules/vpc/file.txt
|
@@ -738,11 +857,23 @@ test_files:
|
|
738
857
|
- spec/fixtures/projects/ruby/google/app/stacks/core/main.rb
|
739
858
|
- spec/fixtures/projects/ruby/google/config/backend.rb
|
740
859
|
- spec/fixtures/projects/ruby/google/config/provider.rb
|
860
|
+
- spec/fixtures/summary/down.log
|
861
|
+
- spec/fixtures/summary/output.log
|
862
|
+
- spec/fixtures/summary/plan/error.log
|
863
|
+
- spec/fixtures/summary/plan/success.log
|
864
|
+
- spec/fixtures/summary/show.log
|
865
|
+
- spec/fixtures/summary/up/error.log
|
866
|
+
- spec/fixtures/summary/up/success.log
|
867
|
+
- spec/fixtures/summary/validate/error.log
|
868
|
+
- spec/fixtures/summary/validate/success.log
|
741
869
|
- spec/fixtures/terraform/args/multiple.rb
|
742
870
|
- spec/fixtures/terraform/args/single.rb
|
743
871
|
- spec/fixtures/terraform/hooks/multiple.rb
|
744
872
|
- spec/fixtures/terraform/hooks/single.rb
|
745
873
|
- spec/spec_helper.rb
|
874
|
+
- spec/terraspace/all/grapher_spec.rb
|
875
|
+
- spec/terraspace/all/runner_spec.rb
|
876
|
+
- spec/terraspace/all/summary_spec.rb
|
746
877
|
- spec/terraspace/compiler/dsl/backend_spec.rb
|
747
878
|
- spec/terraspace/compiler/dsl/data_spec.rb
|
748
879
|
- spec/terraspace/compiler/dsl/locals_spec.rb
|
@@ -756,8 +887,10 @@ test_files:
|
|
756
887
|
- spec/terraspace/compiler/dsl/resource_spec.rb
|
757
888
|
- spec/terraspace/compiler/dsl/terraform_spec.rb
|
758
889
|
- spec/terraspace/compiler/dsl/variable_spec.rb
|
890
|
+
- spec/terraspace/dependency/graph_spec.rb
|
759
891
|
- spec/terraspace/provider/expander/generic_spec.rb
|
760
892
|
- spec/terraspace/seeder/content_spec.rb
|
761
893
|
- spec/terraspace/seeder_spec.rb
|
762
894
|
- spec/terraspace/terraform/args/custom_spec.rb
|
763
895
|
- spec/terraspace/terraform/hooks/builder_spec.rb
|
896
|
+
- spec/terraspace/terraform/remote_state/fetcher_spec.rb
|