terraspace 0.3.3 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cody/aws/bin/build.sh +2 -0
- data/.cody/azurerm/bin/build.sh +2 -0
- data/.cody/google/bin/build.sh +2 -0
- data/CHANGELOG.md +39 -0
- data/README.md +1 -1
- data/lib/templates/base/project/README.md +1 -1
- data/lib/terraspace.rb +1 -0
- data/lib/terraspace/all/preview.rb +1 -1
- data/lib/terraspace/all/runner.rb +1 -0
- data/lib/terraspace/all/summary.rb +29 -2
- data/lib/terraspace/app.rb +9 -5
- data/lib/terraspace/builder.rb +10 -6
- data/lib/terraspace/cli.rb +33 -39
- data/lib/terraspace/cli/all.rb +15 -9
- data/lib/terraspace/cli/bundle.rb +2 -1
- data/lib/terraspace/cli/clean.rb +18 -6
- data/lib/terraspace/cli/clean/all.rb +18 -0
- data/lib/terraspace/cli/clean/base.rb +15 -0
- data/lib/terraspace/cli/clean/cache.rb +25 -0
- data/lib/terraspace/cli/{logs/tasks.rb → clean/logs.rb} +16 -5
- data/lib/terraspace/cli/cloud.rb +3 -9
- data/lib/terraspace/cli/cloud/runs.rb +0 -2
- data/lib/terraspace/cli/help/all/down.md +32 -0
- data/lib/terraspace/cli/help/all/graph.md +21 -0
- data/lib/terraspace/cli/help/all/init.md +33 -0
- data/lib/terraspace/cli/help/all/output.md +22 -0
- data/lib/terraspace/cli/help/all/plan.md +25 -0
- data/lib/terraspace/cli/help/all/providers.md +21 -0
- data/lib/terraspace/cli/help/all/refresh.md +17 -0
- data/lib/terraspace/cli/help/all/show.md +21 -0
- data/lib/terraspace/cli/help/all/up.md +27 -0
- data/lib/terraspace/cli/help/all/validate.md +21 -0
- data/lib/terraspace/cli/help/build.md +6 -0
- data/lib/terraspace/cli/help/bundle.md +9 -5
- data/lib/terraspace/cli/help/check_setup.md +9 -0
- data/lib/terraspace/cli/help/clean/all.md +10 -0
- data/lib/terraspace/cli/help/clean/cache.md +12 -0
- data/lib/terraspace/cli/help/clean/logs.md +17 -0
- data/lib/terraspace/cli/help/cloud/destroy.md +16 -0
- data/lib/terraspace/cli/help/cloud/list.md +7 -0
- data/lib/terraspace/cli/help/cloud/runs/list.md +3 -3
- data/lib/terraspace/cli/help/cloud/runs/prune.md +1 -1
- data/lib/terraspace/cli/help/cloud/sync.md +26 -2
- data/lib/terraspace/cli/help/console.md +8 -0
- data/lib/terraspace/cli/help/down.md +26 -0
- data/lib/terraspace/cli/help/info.md +43 -0
- data/lib/terraspace/cli/help/init.md +37 -0
- data/lib/terraspace/cli/help/list.md +20 -0
- data/lib/terraspace/cli/help/logs.md +48 -0
- data/lib/terraspace/cli/help/logs/remove.md +5 -0
- data/lib/terraspace/cli/help/logs/truncate.md +5 -0
- data/lib/terraspace/cli/help/new/bootstrap_test.md +8 -0
- data/lib/terraspace/cli/help/new/example.md +8 -0
- data/lib/terraspace/cli/help/new/git_hook.md +6 -0
- data/lib/terraspace/cli/help/new/module.md +9 -0
- data/lib/terraspace/cli/help/new/module_test.md +12 -0
- data/lib/terraspace/cli/help/new/plugin.md +49 -0
- data/lib/terraspace/cli/help/new/project.md +40 -0
- data/lib/terraspace/cli/help/new/project_test.md +8 -0
- data/lib/terraspace/cli/help/new/shim.md +21 -0
- data/lib/terraspace/cli/help/new/stack.md +9 -0
- data/lib/terraspace/cli/help/output.md +6 -0
- data/lib/terraspace/cli/help/plan.md +29 -0
- data/lib/terraspace/cli/help/providers.md +18 -0
- data/lib/terraspace/cli/help/refresh.md +11 -0
- data/lib/terraspace/cli/help/seed.md +7 -0
- data/lib/terraspace/cli/help/show.md +36 -0
- data/lib/terraspace/cli/help/summary.md +11 -0
- data/lib/terraspace/cli/help/test.md +35 -0
- data/lib/terraspace/cli/help/up.md +30 -0
- data/lib/terraspace/cli/help/validate.md +9 -0
- data/lib/terraspace/cli/info.rb +4 -16
- data/lib/terraspace/cli/init.rb +3 -7
- data/lib/terraspace/cli/list.rb +2 -1
- data/lib/terraspace/cli/logs.rb +106 -9
- data/lib/terraspace/cli/{log → logs}/concern.rb +1 -1
- data/lib/terraspace/cli/new.rb +18 -18
- data/lib/terraspace/cli/new/git_hook.rb +4 -1
- data/lib/terraspace/cli/new/helper.rb +9 -2
- data/lib/terraspace/cli/new/project.rb +1 -1
- data/lib/terraspace/cli/summary.rb +2 -2
- data/lib/terraspace/command.rb +1 -1
- data/lib/terraspace/compiler/dependencies/helpers.rb +34 -0
- data/lib/terraspace/compiler/dsl/syntax/helpers/common.rb +0 -26
- data/lib/terraspace/compiler/dsl/syntax/tfvar.rb +1 -0
- data/lib/terraspace/compiler/erb/context.rb +1 -1
- data/lib/terraspace/compiler/erb/helpers.rb +6 -0
- data/lib/terraspace/dependency/graph.rb +2 -1
- data/lib/terraspace/dependency/helper/base.rb +7 -0
- data/lib/terraspace/dependency/helper/depends_on.rb +12 -0
- data/lib/terraspace/dependency/helper/output.rb +11 -0
- data/lib/terraspace/hooks/builder.rb +52 -0
- data/lib/terraspace/hooks/concern.rb +9 -0
- data/lib/terraspace/{terraform/hooks → hooks}/dsl.rb +3 -2
- data/lib/terraspace/hooks/runner.rb +23 -0
- data/lib/terraspace/mod.rb +11 -2
- data/lib/terraspace/plugin/summary/interface.rb +4 -2
- data/lib/terraspace/shell.rb +29 -14
- data/lib/terraspace/terraform/args/custom.rb +1 -1
- data/lib/terraspace/terraform/cloud/runs/lister.rb +0 -2
- data/lib/terraspace/terraform/cloud/syncer.rb +2 -2
- data/lib/terraspace/terraform/cloud/workspace.rb +0 -9
- data/lib/terraspace/terraform/remote_state/fetcher.rb +13 -4
- data/lib/terraspace/terraform/remote_state/marker/output.rb +3 -1
- data/lib/terraspace/terraform/remote_state/output_proxy.rb +18 -14
- data/lib/terraspace/terraform/remote_state/unresolved.rb +40 -0
- data/lib/terraspace/terraform/runner.rb +2 -7
- data/lib/terraspace/version.rb +1 -1
- data/spec/fixtures/dependencies/app/stacks/a1/tfvars/dev.tfvars +1 -0
- data/spec/fixtures/fetcher/c1.json +4 -0
- data/spec/terraspace/all/summary_spec.rb +1 -1
- data/spec/terraspace/compiler/erb/render_spec.rb +15 -0
- data/spec/terraspace/dependency/helper/depends_on_spec.rb +27 -0
- data/spec/terraspace/dependency/helper/output_spec.rb +29 -0
- data/spec/terraspace/{terraform/hooks → hooks}/builder_spec.rb +4 -5
- data/spec/terraspace/terraform/remote_state/fetcher_spec.rb +108 -27
- data/spec/terraspace/terraform/remote_state/marker/output_spec.rb +36 -0
- data/spec/terraspace/terraform/remote_state/output_proxy_spec.rb +69 -0
- data/terraspace.gemspec +1 -1
- metadata +78 -13
- data/lib/terraspace/cli/help/log.md +0 -46
- data/lib/terraspace/cli/help/update.md +0 -5
- data/lib/terraspace/cli/log.rb +0 -112
- data/lib/terraspace/terraform/hooks/builder.rb +0 -40
data/lib/terraspace/cli/all.rb
CHANGED
@@ -3,14 +3,14 @@ class Terraspace::CLI
|
|
3
3
|
class_option :yes, aliases: :y, type: :boolean, desc: "auto approve all batch commands"
|
4
4
|
class_option :exit_on_fail, type: :boolean, desc: "whether or not to exit when one of the batch commands fails"
|
5
5
|
|
6
|
-
desc "down", "
|
6
|
+
desc "down", "Destroy all or multiple stacks."
|
7
7
|
long_desc Help.text("all/down")
|
8
8
|
option :destroy_workspace, type: :boolean, desc: "Also destroy the Cloud workspace. Only applies when using Terraform Cloud remote backend."
|
9
9
|
def down(*stacks)
|
10
10
|
Terraspace::All::Runner.new("down", @options.merge(stacks: stacks)).run
|
11
11
|
end
|
12
12
|
|
13
|
-
desc "graph", "graph
|
13
|
+
desc "graph", "Draw a dependency graph."
|
14
14
|
long_desc Help.text("all/graph")
|
15
15
|
option :format, default: "png", desc: "format: text or diagram"
|
16
16
|
option :full,type: :boolean, desc: "draw the full graph with highlighted nodes or draw the subgraph. text format defaults to false, graph format defaults to true"
|
@@ -18,43 +18,49 @@ class Terraspace::CLI
|
|
18
18
|
Terraspace::All::Grapher.new(@options.merge(stacks: stacks)).run
|
19
19
|
end
|
20
20
|
|
21
|
-
desc "
|
21
|
+
desc "init", "Init all or multiple stacks."
|
22
|
+
long_desc Help.text("all/init")
|
23
|
+
def init(*stacks)
|
24
|
+
Terraspace::All::Runner.new("init", @options.merge(stacks: stacks)).run
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "refresh", "Refresh all or multiple stacks."
|
22
28
|
long_desc Help.text("all/refresh")
|
23
29
|
def refresh(*stacks)
|
24
30
|
Terraspace::All::Runner.new("refresh", @options.merge(stacks: stacks)).run
|
25
31
|
end
|
26
32
|
|
27
|
-
desc "output", "output all"
|
33
|
+
desc "output", "Show output for all or multiple stacks."
|
28
34
|
long_desc Help.text("all/output")
|
29
35
|
def output(*stacks)
|
30
36
|
Terraspace::All::Runner.new("output", @options.merge(stacks: stacks)).run
|
31
37
|
end
|
32
38
|
|
33
|
-
desc "plan", "plan all"
|
39
|
+
desc "plan", "Run plan for all or multiple stacks."
|
34
40
|
long_desc Help.text("all/plan")
|
35
41
|
def plan(*stacks)
|
36
42
|
Terraspace::All::Runner.new("plan", @options.merge(stacks: stacks)).run
|
37
43
|
end
|
38
44
|
|
39
|
-
desc "providers", "providers all"
|
45
|
+
desc "providers", "Show providers for all or multiple stacks."
|
40
46
|
long_desc Help.text("all/providers")
|
41
47
|
def providers(*stacks)
|
42
48
|
Terraspace::All::Runner.new("providers", @options.merge(stacks: stacks)).run
|
43
49
|
end
|
44
50
|
|
45
|
-
desc "show", "show all"
|
51
|
+
desc "show", "Run show for all or multiple stacks."
|
46
52
|
long_desc Help.text("all/show")
|
47
53
|
def show(*stacks)
|
48
54
|
Terraspace::All::Runner.new("show", @options.merge(stacks: stacks)).run
|
49
55
|
end
|
50
56
|
|
51
|
-
desc "up", "
|
57
|
+
desc "up", "Deploy all or multiple stacks."
|
52
58
|
long_desc Help.text("all/up")
|
53
59
|
def up(*stacks)
|
54
60
|
Terraspace::All::Runner.new("up", @options.merge(stacks: stacks)).run
|
55
61
|
end
|
56
62
|
|
57
|
-
desc "validate", "
|
63
|
+
desc "validate", "Validate all or multiple stacks."
|
58
64
|
long_desc Help.text("all/validate")
|
59
65
|
def validate(*stacks)
|
60
66
|
Terraspace::All::Runner.new("validate", @options.merge(stacks: stacks)).run
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require "terraspace-bundler"
|
2
|
-
TerraspaceBundler.config.logger = Terraspace.logger
|
3
2
|
|
4
3
|
class Terraspace::CLI
|
5
4
|
class Bundle
|
@@ -8,6 +7,8 @@ class Terraspace::CLI
|
|
8
7
|
end
|
9
8
|
|
10
9
|
def run
|
10
|
+
Terraspace.check_project!
|
11
|
+
TerraspaceBundler.config.deep_merge!(Terraspace.config.bundle)
|
11
12
|
TerraspaceBundler::CLI.start(args)
|
12
13
|
end
|
13
14
|
|
data/lib/terraspace/cli/clean.rb
CHANGED
@@ -1,12 +1,24 @@
|
|
1
1
|
class Terraspace::CLI
|
2
|
-
class Clean
|
3
|
-
|
4
|
-
|
2
|
+
class Clean < Terraspace::Command
|
3
|
+
class_option :yes, aliases: :y, type: :boolean, desc: "bypass are you sure prompt"
|
4
|
+
|
5
|
+
desc "all", "Runs all clean operations."
|
6
|
+
long_desc Help.text("clean/all")
|
7
|
+
def all
|
8
|
+
All.new(options).run
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "cache", "Removes cache dirs."
|
12
|
+
long_desc Help.text("clean/cache")
|
13
|
+
def cache
|
14
|
+
Cache.new(options).run
|
5
15
|
end
|
6
16
|
|
7
|
-
|
8
|
-
|
9
|
-
|
17
|
+
desc "logs", "Removes or truncate logs."
|
18
|
+
long_desc Help.text("clean/logs")
|
19
|
+
option :truncate, aliases: :t, type: :boolean, desc: "Truncate instead of remove logs"
|
20
|
+
def logs
|
21
|
+
Logs.new(options).run
|
10
22
|
end
|
11
23
|
end
|
12
24
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class Terraspace::CLI::Clean
|
2
|
+
class All < Base
|
3
|
+
def run
|
4
|
+
are_you_sure?
|
5
|
+
o = @options.merge(yes: true) # override to avoid double prompt
|
6
|
+
Cache.new(o).run
|
7
|
+
Logs.new(o).run
|
8
|
+
end
|
9
|
+
|
10
|
+
def are_you_sure?
|
11
|
+
message = <<~EOL.chomp
|
12
|
+
Will remove Terraspace cache and logs.
|
13
|
+
Are you sure?
|
14
|
+
EOL
|
15
|
+
sure?(message) # from Util::Sure
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Terraspace::CLI::Clean
|
2
|
+
class Base
|
3
|
+
include Terraspace::Util::Logging
|
4
|
+
include Terraspace::Util::Sure
|
5
|
+
|
6
|
+
def initialize(options={})
|
7
|
+
@options = options
|
8
|
+
Terraspace.check_project!
|
9
|
+
end
|
10
|
+
|
11
|
+
def pretty(path)
|
12
|
+
Terraspace::Util.pretty_path(path)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class Terraspace::CLI::Clean
|
2
|
+
class Cache < Base
|
3
|
+
def run
|
4
|
+
Terraspace.check_project!
|
5
|
+
paths = [Terraspace.cache_root, Terraspace.tmp_root]
|
6
|
+
are_you_sure?(paths)
|
7
|
+
paths.each do |path|
|
8
|
+
FileUtils.rm_rf(path)
|
9
|
+
puts "Removed #{pretty(path)}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def are_you_sure?(paths)
|
14
|
+
pretty_paths = paths.map { |p| " #{pretty(p)}" }.join("\n")
|
15
|
+
message = <<~EOL.chomp
|
16
|
+
Will remove these folders and all their files:
|
17
|
+
|
18
|
+
#{pretty_paths}
|
19
|
+
|
20
|
+
Are you sure?
|
21
|
+
EOL
|
22
|
+
sure?(message) # from Util::Sure
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,11 +1,13 @@
|
|
1
|
-
class Terraspace::CLI::
|
2
|
-
class
|
3
|
-
def
|
4
|
-
@options
|
1
|
+
class Terraspace::CLI::Clean
|
2
|
+
class Logs < Base
|
3
|
+
def run
|
4
|
+
action = @options[:truncate] ? "truncate" : "remove"
|
5
|
+
are_you_sure?(action)
|
6
|
+
@options[:truncate] ? truncate : remove
|
7
|
+
logger.info "Logs #{action}d" # IE: Logs truncated or Logs removed
|
5
8
|
end
|
6
9
|
|
7
10
|
def truncate
|
8
|
-
puts "Truncating log files in #{pretty_log_root}/" unless @options[:mute]
|
9
11
|
log_files.each do |path|
|
10
12
|
File.open(path, "w").close # truncates files
|
11
13
|
end
|
@@ -28,5 +30,14 @@ class Terraspace::CLI::Logs
|
|
28
30
|
def log_root
|
29
31
|
Terraspace.config.log.root
|
30
32
|
end
|
33
|
+
|
34
|
+
def are_you_sure?(action)
|
35
|
+
message = <<~EOL.chomp
|
36
|
+
Will #{action} all the log files in #{pretty_log_root}/ folder
|
37
|
+
Are you sure?
|
38
|
+
EOL
|
39
|
+
sure?(message) # from Util::Sure
|
40
|
+
end
|
31
41
|
end
|
32
42
|
end
|
43
|
+
|
data/lib/terraspace/cli/cloud.rb
CHANGED
@@ -20,17 +20,11 @@ class Terraspace::CLI
|
|
20
20
|
Workspace.new(options.merge(mod: mod)).destroy
|
21
21
|
end
|
22
22
|
|
23
|
-
desc "
|
24
|
-
long_desc Help.text("cloud:setup")
|
25
|
-
def setup(mod)
|
26
|
-
Workspace.new(options.merge(mod: mod)).setup
|
27
|
-
end
|
28
|
-
|
29
|
-
desc "sync [STACK]", "sync workspace"
|
23
|
+
desc "sync [STACK]", "Sync all or multiple workspaces."
|
30
24
|
long_desc Help.text("cloud:sync")
|
31
25
|
yes_option.call
|
32
|
-
def sync(
|
33
|
-
Syncer.new(options.merge(
|
26
|
+
def sync(*stacks)
|
27
|
+
Syncer.new(options.merge(stacks: stacks, override_auto_sync: true)).run
|
34
28
|
end
|
35
29
|
|
36
30
|
desc "runs SUBCOMMAND", "runs subcommands"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all down
|
4
|
+
Will run:
|
5
|
+
terraspace down a1 # batch 1
|
6
|
+
terraspace down b1 # batch 2
|
7
|
+
terraspace down b2 # batch 2
|
8
|
+
terraspace down c1 # batch 3
|
9
|
+
Are you sure? (y/N)
|
10
|
+
|
11
|
+
Once you confirm, Terraspace destroys the infrastructure.
|
12
|
+
|
13
|
+
Are you sure? (y/N) y
|
14
|
+
Batch Run 1:
|
15
|
+
Running: terraspace down a1 Logs: log/down/a1.log
|
16
|
+
terraspace down a1: Changes to Outputs:
|
17
|
+
terraspace down a1: Destroy complete! Resources: 2 destroyed.
|
18
|
+
Batch Run 2:
|
19
|
+
Running: terraspace down b1 Logs: log/down/b1.log
|
20
|
+
Running: terraspace down b2 Logs: log/down/b2.log
|
21
|
+
terraspace down b1: Changes to Outputs:
|
22
|
+
terraspace down b1: Destroy complete! Resources: 2 destroyed.
|
23
|
+
terraspace down b2: Changes to Outputs:
|
24
|
+
terraspace down b2: Destroy complete! Resources: 1 destroyed.
|
25
|
+
Batch Run 3:
|
26
|
+
Running: terraspace down c1 Logs: log/down/c1.log
|
27
|
+
terraspace down c1: Changes to Outputs:
|
28
|
+
terraspace down c1: Destroy complete! Resources: 1 destroyed.
|
29
|
+
Time took: 15s
|
30
|
+
$
|
31
|
+
|
32
|
+
Terraspace provides a reduced-noise summary of the runs. The full logs are also written for further inspection and debugging. The [terraspace log](https://terraspace.cloud/reference/terraspace-log/) command is useful for viewing the logs.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all graph
|
4
|
+
Building graph...
|
5
|
+
Graph saved to .terraspace-cache/graph/dependencies-20200919192103.png
|
6
|
+
$
|
7
|
+
|
8
|
+
The graph will auto-open on macosx and cloud9.
|
9
|
+
|
10
|
+
![](https://img.boltops.com/boltops/tools/terraspace/graphs/example-a1.png)
|
11
|
+
|
12
|
+
## Text Form
|
13
|
+
|
14
|
+
You can also generate a graph in text, tree-like form
|
15
|
+
|
16
|
+
$ terraspace all graph --format text
|
17
|
+
a1
|
18
|
+
├── b2
|
19
|
+
│ └── c1
|
20
|
+
└── b1
|
21
|
+
└── c1
|
@@ -0,0 +1,33 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all init
|
4
|
+
Building one stack to build all stacks
|
5
|
+
Building .terraspace-cache/us-west-2/dev/stacks/c1
|
6
|
+
Downloading tfstate files for dependencies defined in tfvars...
|
7
|
+
Built in .terraspace-cache/us-west-2/dev/stacks/c1
|
8
|
+
Running:
|
9
|
+
terraspace init c1 # batch 1
|
10
|
+
terraspace init b1 # batch 2
|
11
|
+
terraspace init b2 # batch 2
|
12
|
+
terraspace init a1 # batch 3
|
13
|
+
Batch Run 1:
|
14
|
+
Running: terraspace init c1 Logs: log/init/c1.log
|
15
|
+
terraspace init c1: Terraform has been successfully initialized!
|
16
|
+
Batch Run 2:
|
17
|
+
Running: terraspace init b1 Logs: log/init/b1.log
|
18
|
+
Running: terraspace init b2 Logs: log/init/b2.log
|
19
|
+
terraspace init b1: Terraform has been successfully initialized!
|
20
|
+
terraspace init b2: Terraform has been successfully initialized!
|
21
|
+
Batch Run 3:
|
22
|
+
Running: terraspace init a1 Logs: log/init/a1.log
|
23
|
+
terraspace init a1: Terraform has been successfully initialized!
|
24
|
+
Time took: 6s
|
25
|
+
$
|
26
|
+
|
27
|
+
If Terraform is having trouble initializing, clearing the cache may help:
|
28
|
+
|
29
|
+
$ terraspace clean cache -y
|
30
|
+
Removed .terraspace-cache
|
31
|
+
Removed /tmp/terraspace
|
32
|
+
|
33
|
+
Also consider disabling the [terraform.plugin_cache.enabled](https://terraspace.cloud/docs/config/reference/).
|
@@ -0,0 +1,22 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all output
|
4
|
+
Running:
|
5
|
+
terraspace output c1 # batch 1
|
6
|
+
terraspace output b1 # batch 2
|
7
|
+
terraspace output b2 # batch 2
|
8
|
+
terraspace output a1 # batch 3
|
9
|
+
Batch Run 1:
|
10
|
+
Running: terraspace output c1 Logs: log/output/c1.log
|
11
|
+
terraspace output c1: length = 1
|
12
|
+
Batch Run 2:
|
13
|
+
Running: terraspace output b1 Logs: log/output/b1.log
|
14
|
+
Running: terraspace output b2 Logs: log/output/b2.log
|
15
|
+
terraspace output b1: length = 1
|
16
|
+
terraspace output b1: length2 = 1
|
17
|
+
terraspace output b2: length = 1
|
18
|
+
Batch Run 3:
|
19
|
+
Running: terraspace output a1 Logs: log/output/a1.log
|
20
|
+
terraspace output a1: Warning: No outputs found
|
21
|
+
Time took: 12s
|
22
|
+
$
|
@@ -0,0 +1,25 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all plan
|
4
|
+
Running:
|
5
|
+
terraspace plan c1 # batch 1
|
6
|
+
terraspace plan b1 # batch 2
|
7
|
+
terraspace plan b2 # batch 2
|
8
|
+
terraspace plan a1 # batch 3
|
9
|
+
Batch Run 1:
|
10
|
+
Running: terraspace plan c1 Logs: log/plan/c1.log
|
11
|
+
terraspace plan c1: Plan: 1 to add, 0 to change, 0 to destroy.
|
12
|
+
terraspace plan c1: Changes to Outputs:
|
13
|
+
Batch Run 2:
|
14
|
+
Running: terraspace plan b1 Logs: log/plan/b1.log
|
15
|
+
Running: terraspace plan b2 Logs: log/plan/b2.log
|
16
|
+
terraspace plan b1: Plan: 2 to add, 0 to change, 0 to destroy.
|
17
|
+
terraspace plan b1: Changes to Outputs:
|
18
|
+
terraspace plan b2: Plan: 1 to add, 0 to change, 0 to destroy.
|
19
|
+
terraspace plan b2: Changes to Outputs:
|
20
|
+
Batch Run 3:
|
21
|
+
Running: terraspace plan a1 Logs: log/plan/a1.log
|
22
|
+
terraspace plan a1: Plan: 2 to add, 0 to change, 0 to destroy.
|
23
|
+
terraspace plan a1: Changes to Outputs:
|
24
|
+
Time took: 11s
|
25
|
+
$
|
@@ -0,0 +1,21 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all providers
|
4
|
+
Running:
|
5
|
+
terraspace providers c1 # batch 1
|
6
|
+
terraspace providers b1 # batch 2
|
7
|
+
terraspace providers b2 # batch 2
|
8
|
+
terraspace providers a1 # batch 3
|
9
|
+
Batch Run 1:
|
10
|
+
Running: terraspace providers c1 Logs: log/providers/c1.log
|
11
|
+
terraspace providers c1: └── provider[registry.terraform.io/hashicorp/random]
|
12
|
+
Batch Run 2:
|
13
|
+
Running: terraspace providers b1 Logs: log/providers/b1.log
|
14
|
+
Running: terraspace providers b2 Logs: log/providers/b2.log
|
15
|
+
terraspace providers b1: └── provider[registry.terraform.io/hashicorp/random]
|
16
|
+
terraspace providers b2: └── provider[registry.terraform.io/hashicorp/random]
|
17
|
+
Batch Run 3:
|
18
|
+
Running: terraspace providers a1 Logs: log/providers/a1.log
|
19
|
+
terraspace providers a1: └── provider[registry.terraform.io/hashicorp/random]
|
20
|
+
Time took: 9s
|
21
|
+
$
|
@@ -0,0 +1,17 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all refresh
|
4
|
+
Running:
|
5
|
+
terraspace refresh c1 # batch 1
|
6
|
+
terraspace refresh b1 # batch 2
|
7
|
+
terraspace refresh b2 # batch 2
|
8
|
+
terraspace refresh a1 # batch 3
|
9
|
+
Batch Run 1:
|
10
|
+
Running: terraspace refresh c1 Logs: log/refresh/c1.log
|
11
|
+
Batch Run 2:
|
12
|
+
Running: terraspace refresh b1 Logs: log/refresh/b1.log
|
13
|
+
Running: terraspace refresh b2 Logs: log/refresh/b2.log
|
14
|
+
Batch Run 3:
|
15
|
+
Running: terraspace refresh a1 Logs: log/refresh/a1.log
|
16
|
+
Time took: 11s
|
17
|
+
$
|
@@ -0,0 +1,21 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace all show
|
4
|
+
Running:
|
5
|
+
terraspace show c1 # batch 1
|
6
|
+
terraspace show b1 # batch 2
|
7
|
+
terraspace show b2 # batch 2
|
8
|
+
terraspace show a1 # batch 3
|
9
|
+
Batch Run 1:
|
10
|
+
Running: terraspace show c1 Logs: log/show/c1.log
|
11
|
+
terraspace show c1: Resources: 0 Outputs: 1
|
12
|
+
Batch Run 2:
|
13
|
+
Running: terraspace show b1 Logs: log/show/b1.log
|
14
|
+
Running: terraspace show b2 Logs: log/show/b2.log
|
15
|
+
terraspace show b1: Resources: 0 Outputs: 2
|
16
|
+
terraspace show b2: Resources: 0 Outputs: 1
|
17
|
+
Batch Run 3:
|
18
|
+
Running: terraspace show a1 Logs: log/show/a1.log
|
19
|
+
terraspace show a1: Resources: 0 Outputs: 0
|
20
|
+
Time took: 12s
|
21
|
+
$
|