terraspace 0.3.0 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) 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 +26 -1
  6. data/README.md +2 -2
  7. data/lib/terraspace.rb +2 -0
  8. data/lib/terraspace/all/preview.rb +1 -1
  9. data/lib/terraspace/all/summary.rb +21 -1
  10. data/lib/terraspace/app.rb +1 -0
  11. data/lib/terraspace/builder.rb +9 -0
  12. data/lib/terraspace/cli.rb +25 -25
  13. data/lib/terraspace/cli/all.rb +9 -9
  14. data/lib/terraspace/cli/cloud.rb +3 -9
  15. data/lib/terraspace/cli/cloud/runs.rb +0 -2
  16. data/lib/terraspace/cli/commander.rb +0 -10
  17. data/lib/terraspace/cli/help/all/down.md +32 -0
  18. data/lib/terraspace/cli/help/all/graph.md +21 -0
  19. data/lib/terraspace/cli/help/all/output.md +22 -0
  20. data/lib/terraspace/cli/help/all/plan.md +25 -0
  21. data/lib/terraspace/cli/help/all/providers.md +21 -0
  22. data/lib/terraspace/cli/help/all/refresh.md +17 -0
  23. data/lib/terraspace/cli/help/all/show.md +21 -0
  24. data/lib/terraspace/cli/help/all/up.md +27 -0
  25. data/lib/terraspace/cli/help/all/validate.md +21 -0
  26. data/lib/terraspace/cli/help/build.md +6 -0
  27. data/lib/terraspace/cli/help/bundle.md +9 -5
  28. data/lib/terraspace/cli/help/check_setup.md +9 -0
  29. data/lib/terraspace/cli/help/clean.md +5 -0
  30. data/lib/terraspace/cli/help/cloud/destroy.md +16 -0
  31. data/lib/terraspace/cli/help/cloud/list.md +7 -0
  32. data/lib/terraspace/cli/help/cloud/runs/list.md +3 -3
  33. data/lib/terraspace/cli/help/cloud/runs/prune.md +2 -2
  34. data/lib/terraspace/cli/help/cloud/sync.md +26 -2
  35. data/lib/terraspace/cli/help/console.md +8 -0
  36. data/lib/terraspace/cli/help/down.md +26 -0
  37. data/lib/terraspace/cli/help/info.md +43 -0
  38. data/lib/terraspace/cli/help/init.md +37 -0
  39. data/lib/terraspace/cli/help/list.md +20 -0
  40. data/lib/terraspace/cli/help/log.md +8 -2
  41. data/lib/terraspace/cli/help/logs/remove.md +5 -0
  42. data/lib/terraspace/cli/help/logs/truncate.md +5 -0
  43. data/lib/terraspace/cli/help/new/bootstrap_test.md +8 -0
  44. data/lib/terraspace/cli/help/new/example.md +8 -0
  45. data/lib/terraspace/cli/help/new/git_hook.md +6 -0
  46. data/lib/terraspace/cli/help/new/module.md +9 -0
  47. data/lib/terraspace/cli/help/new/module_test.md +12 -0
  48. data/lib/terraspace/cli/help/new/plugin.md +49 -0
  49. data/lib/terraspace/cli/help/new/project.md +40 -0
  50. data/lib/terraspace/cli/help/new/project_test.md +8 -0
  51. data/lib/terraspace/cli/help/new/shim.md +21 -0
  52. data/lib/terraspace/cli/help/new/stack.md +9 -0
  53. data/lib/terraspace/cli/help/output.md +6 -0
  54. data/lib/terraspace/cli/help/plan.md +29 -0
  55. data/lib/terraspace/cli/help/providers.md +18 -0
  56. data/lib/terraspace/cli/help/refresh.md +11 -0
  57. data/lib/terraspace/cli/help/seed.md +7 -0
  58. data/lib/terraspace/cli/help/show.md +36 -0
  59. data/lib/terraspace/cli/help/summary.md +11 -0
  60. data/lib/terraspace/cli/help/test.md +35 -0
  61. data/lib/terraspace/cli/help/up.md +30 -0
  62. data/lib/terraspace/cli/help/validate.md +9 -0
  63. data/lib/terraspace/cli/info.rb +4 -16
  64. data/lib/terraspace/cli/logs.rb +1 -1
  65. data/lib/terraspace/cli/new.rb +18 -18
  66. data/lib/terraspace/cli/new/git_hook.rb +4 -1
  67. data/lib/terraspace/cli/new/project.rb +1 -1
  68. data/lib/terraspace/cli/summary.rb +2 -2
  69. data/lib/terraspace/command.rb +1 -1
  70. data/lib/terraspace/compiler/backend.rb +10 -0
  71. data/lib/terraspace/compiler/builder.rb +2 -1
  72. data/lib/terraspace/compiler/commands_concern.rb +18 -0
  73. data/lib/terraspace/compiler/dependencies/helpers.rb +34 -0
  74. data/lib/terraspace/compiler/dsl/syntax/helpers/common.rb +0 -26
  75. data/lib/terraspace/compiler/dsl/syntax/tfvar.rb +1 -0
  76. data/lib/terraspace/compiler/erb/context.rb +1 -1
  77. data/lib/terraspace/compiler/erb/helpers.rb +6 -0
  78. data/lib/terraspace/dependency/graph.rb +2 -1
  79. data/lib/terraspace/dependency/helper/base.rb +7 -0
  80. data/lib/terraspace/dependency/helper/depends_on.rb +12 -0
  81. data/lib/terraspace/dependency/helper/output.rb +11 -0
  82. data/lib/terraspace/plugin/summary/interface.rb +1 -1
  83. data/lib/terraspace/shell.rb +44 -16
  84. data/lib/terraspace/terraform/cloud/runs/lister.rb +0 -2
  85. data/lib/terraspace/terraform/cloud/syncer.rb +2 -2
  86. data/lib/terraspace/terraform/cloud/workspace.rb +0 -9
  87. data/lib/terraspace/terraform/remote_state/fetcher.rb +37 -7
  88. data/lib/terraspace/terraform/remote_state/marker/output.rb +3 -1
  89. data/lib/terraspace/terraform/remote_state/null_object.rb +40 -0
  90. data/lib/terraspace/terraform/remote_state/output_proxy.rb +18 -14
  91. data/lib/terraspace/version.rb +1 -1
  92. data/spec/fixtures/dependencies/app/stacks/a1/tfvars/dev.tfvars +1 -0
  93. data/spec/fixtures/fetcher/c1.json +4 -0
  94. data/spec/terraspace/all/summary_spec.rb +1 -1
  95. data/spec/terraspace/compiler/erb/render_spec.rb +15 -0
  96. data/spec/terraspace/dependency/helper/depends_on_spec.rb +27 -0
  97. data/spec/terraspace/dependency/helper/output_spec.rb +29 -0
  98. data/spec/terraspace/terraform/remote_state/fetcher_spec.rb +108 -27
  99. data/spec/terraspace/terraform/remote_state/marker/output_spec.rb +36 -0
  100. data/spec/terraspace/terraform/remote_state/output_proxy_spec.rb +69 -0
  101. metadata +62 -3
  102. data/lib/terraspace/cli/help/update.md +0 -5
@@ -1,5 +1,3 @@
1
- require 'cli-format'
2
-
3
1
  class Terraspace::CLI::Cloud
4
2
  class Runs < Terraspace::Command
5
3
  Help = Terraspace::CLI::Help
@@ -7,18 +7,8 @@ class Terraspace::CLI
7
7
 
8
8
  def run
9
9
  Terraspace::Builder.new(@options).run unless @options[:build] # Up already ran build
10
- auto_create_backend
11
10
  Init.new(@options.merge(calling_command: @name)).run
12
11
  Terraspace::Terraform::Runner.new(@name, @options).run
13
12
  end
14
-
15
- def auto_create_backend
16
- return unless auto_create?
17
- Terraspace::Compiler::Backend.new(@mod).create
18
- end
19
-
20
- def auto_create?
21
- @name == "apply" || @name == "plan" && @options[:yes]
22
- end
23
13
  end
24
14
  end
@@ -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,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
+ $
@@ -0,0 +1,27 @@
1
+ ## Example
2
+
3
+ $ terraspace all up
4
+ Will run:
5
+ terraspace up c1 # batch 1
6
+ terraspace up b1 # batch 2
7
+ terraspace up b2 # batch 2
8
+ terraspace up a1 # batch 3
9
+ Are you sure? (y/N)
10
+
11
+ Once you confirm, Terraspace deploys the batches in parallel. Essentially, Terraspace handles the orchestration.
12
+
13
+ Are you sure? (y/N) y
14
+ Batch Run 1:
15
+ Running: terraspace up c1 Logs: log/up/c1.log
16
+ terraspace up c1: Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
17
+ Batch Run 2:
18
+ Running: terraspace up b1 Logs: log/up/b1.log
19
+ Running: terraspace up b2 Logs: log/up/b2.log
20
+ terraspace up b1: Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
21
+ terraspace up b2: Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
22
+ Batch Run 3:
23
+ Running: terraspace up a1 Logs: log/up/a1.log
24
+ terraspace up a1: Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
25
+ Time took: 25s
26
+
27
+ 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 validate
4
+ Running:
5
+ terraspace validate c1 # batch 1
6
+ terraspace validate b1 # batch 2
7
+ terraspace validate b2 # batch 2
8
+ terraspace validate a1 # batch 3
9
+ Batch Run 1:
10
+ Running: terraspace validate c1 Logs: log/validate/c1.log
11
+ terraspace validate c1: Success! The configuration is valid.
12
+ Batch Run 2:
13
+ Running: terraspace validate b1 Logs: log/validate/b1.log
14
+ Running: terraspace validate b2 Logs: log/validate/b2.log
15
+ terraspace validate b1: Success! The configuration is valid.
16
+ terraspace validate b2: Success! The configuration is valid.
17
+ Batch Run 3:
18
+ Running: terraspace validate a1 Logs: log/validate/a1.log
19
+ terraspace validate a1: Success! The configuration is valid.
20
+ Time took: 13s
21
+ $
@@ -0,0 +1,6 @@
1
+ ## Example
2
+
3
+ $ terraspace build
4
+ Building .terraspace-cache/us-west-2/dev/stacks/demo
5
+ Built in .terraspace-cache/us-west-2/dev/stacks/demo
6
+ $
@@ -4,11 +4,15 @@
4
4
 
5
5
  ## More commands
6
6
 
7
- terraspace bundle install # same as bundle
8
- terraspace bundle update # Updates Terrafile.lock
9
- terraspace bundle clean # removes /tmp terraspace bundler folder
7
+ terraspace bundle install # same as bundle
8
+ terraspace bundle update # Updates Terrafile.lock
9
+ terraspace bundle purge_cache # removes /tmp terraspace bundler folder
10
10
 
11
11
  ## Update a single module
12
12
 
13
- terraspace bundle update MOD_NAME
14
- terraspace bundle update demo
13
+ terraspace bundle update MODULE
14
+ terraspace bundle update demo
15
+
16
+ ## Info on a module
17
+
18
+ terraspace bundle info MODULE
@@ -0,0 +1,9 @@
1
+ ## Example
2
+
3
+ $ terraspace check_setup
4
+ Detected Terrspace version: 0.3.3
5
+ Detected Terraform bin: /home/ec2-user/.tfenv/bin/terraform
6
+ Detected Terraform v0.13.2
7
+ Terraspace requires Terraform v0.12.x and above
8
+ You're all set!
9
+ $
@@ -0,0 +1,5 @@
1
+ ## Example
2
+
3
+ $ terraspace clean
4
+ Removed .terraspace-cache
5
+ $
@@ -0,0 +1,16 @@
1
+ ## Example
2
+
3
+ $ terraspace cloud destroy demo
4
+ You are about to delete the workspace: demo-dev-us-west-2
5
+ All variables, settings, run history, and state history will be removed.
6
+ This cannot be undone.
7
+
8
+ This will NOT remove any infrastructure managed by this workspace.
9
+ If needed, destroy the infrastructure prior to deleting the workspace with:
10
+
11
+ terraspace down demo
12
+
13
+ This will delete the workspace: demo-dev-us-west-2.
14
+ Are you sure? (y/N) y
15
+ Destroying workspace demo-dev-us-west-2
16
+ $
@@ -0,0 +1,7 @@
1
+ ## Example
2
+
3
+ $ terraspace cloud list
4
+ Workspaces for boltops:
5
+ demo-dev-us-west-2
6
+ demo2-dev-us-west-2
7
+ $
@@ -2,7 +2,7 @@
2
2
 
3
3
  Statuses of pending and planned are shown by default.
4
4
 
5
- $ terraspace cloud runs list pet
5
+ $ terraspace cloud runs list demo
6
6
  +----------------------+---------+---------------------------------+---------------------+
7
7
  | Id | Status | Message | Created At |
8
8
  +----------------------+---------+---------------------------------+---------------------+
@@ -13,7 +13,7 @@ Statuses of pending and planned are shown by default.
13
13
 
14
14
  To see all most recent runs, use `--status all`.
15
15
 
16
- $ terraspace cloud runs list pet --status all
16
+ $ terraspace cloud runs list demo --status all
17
17
  +----------------------+-----------+--------------------------------+---------------------+
18
18
  | Id | Status | Message | Created At |
19
19
  +----------------------+-----------+--------------------------------+---------------------+
@@ -26,7 +26,7 @@ To see all most recent runs, use `--status all`.
26
26
 
27
27
  You can provide a list of statuses to the `--status` filter option.
28
28
 
29
- $ terraspace cloud runs list pet --status canceled discarded
29
+ $ terraspace cloud runs list demo --status canceled discarded
30
30
  +----------------------+-----------+--------------------------------+---------------------+
31
31
  | Id | Status | Message | Created At |
32
32
  +----------------------+-----------+--------------------------------+---------------------+
@@ -1,4 +1,4 @@
1
- This leaves the to most recent run alone. The top run will immediately start planning. Runs that are also in "Needs Confirmation" will be cancelled.
1
+ This leaves the top run alone. The top run usually starts immediately planning once the other runs are pruned. Runs that are also in "Needs Confirmation" will be cancelled.
2
2
 
3
3
  ## Examples
4
4
 
@@ -7,7 +7,7 @@ This leaves the to most recent run alone. The top run will immediately start pla
7
7
 
8
8
  ## Example with Output
9
9
 
10
- $ terraspace cloud runs prune pet
10
+ $ terraspace cloud runs prune demo
11
11
  Will keep:
12
12
 
13
13
  run-9muMrjrd22vhsP4u pending test 2020-09-18T12:47:11
@@ -1,4 +1,6 @@
1
- ## Example
1
+ ## Examples
2
+
3
+ Sync all stacks:
2
4
 
3
5
  $ terraspace cloud sync
4
6
  About to sync these project stacks with Terraform Cloud workspaces:
@@ -16,4 +18,26 @@
16
18
  Are you sure? (y/N) y
17
19
  Syncing to Terraform Cloud: demo => demo-dev-us-west-2
18
20
  Syncing to Terraform Cloud: demo2 => demo2-dev-us-west-2
19
- $
21
+ $
22
+
23
+ Sync specific stacks:
24
+
25
+ $ terraspace cloud sync demo
26
+ About to sync these project stacks with Terraform Cloud workspaces:
27
+
28
+ Stack => Workspace
29
+ demo => demo-dev-us-west-2
30
+
31
+ A sync does the following for each workspace:
32
+
33
+ 1. Create or update workspace, including the VCS settings.
34
+ 2. Set the working dir.
35
+ 3. Set env and terraform variables.
36
+
37
+ Are you sure? (y/N) y
38
+ Syncing to Terraform Cloud: demo => demo-dev-us-west-2
39
+ $
40
+
41
+ Can also specify multiple stacks:
42
+
43
+ terraspace cloud sync demo demo2
@@ -0,0 +1,8 @@
1
+ ## Example
2
+
3
+ $ terraspace console demo
4
+ Building .terraspace-cache/us-west-2/dev/stacks/demo
5
+ Built in .terraspace-cache/us-west-2/dev/stacks/demo
6
+ Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
7
+ => terraform console
8
+ >
@@ -0,0 +1,26 @@
1
+ ## Example
2
+
3
+ $ terraspace down demo
4
+ Building .terraspace-cache/us-west-2/dev/stacks/demo
5
+ Built in .terraspace-cache/us-west-2/dev/stacks/demo
6
+ Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
7
+ => terraform destroy
8
+ # ...
9
+ Plan: 0 to add, 0 to change, 2 to destroy.
10
+
11
+ Changes to Outputs:
12
+ - bucket_name = "bucket-trusty-marmoset" -> null
13
+
14
+ Do you really want to destroy all resources?
15
+ Terraform will destroy all your managed infrastructure, as shown above.
16
+ There is no undo. Only 'yes' will be accepted to confirm.
17
+ Enter a value: yes
18
+
19
+ module.bucket.aws_s3_bucket.this: Destroying... [id=bucket-trusty-marmoset]
20
+ module.bucket.aws_s3_bucket.this: Destruction complete after 0s
21
+ random_pet.this: Destroying... [id=trusty-marmoset]
22
+ random_pet.this: Destruction complete after 0s
23
+
24
+ Destroy complete! Resources: 2 destroyed.
25
+ Time took: 21s
26
+ $
@@ -0,0 +1,43 @@
1
+ ## Example
2
+
3
+ $ terraspace info demo
4
+ +-----------+---------------------------------------------+
5
+ | Name | Value |
6
+ +-----------+---------------------------------------------+
7
+ | build_dir | stacks/demo |
8
+ | cache_dir | .terraspace-cache/us-west-2/dev/stacks/demo |
9
+ | name | demo |
10
+ | root | app/stacks/demo |
11
+ | type | stack |
12
+ | type_dir | stacks |
13
+ +-----------+---------------------------------------------+
14
+
15
+ You can also format the output in json:
16
+
17
+ $ terraspace info demo --format json
18
+ [
19
+ {
20
+ "Name": "build_dir",
21
+ "Value": "stacks/demo"
22
+ },
23
+ {
24
+ "Name": "cache_dir",
25
+ "Value": ".terraspace-cache/us-west-2/dev/stacks/demo"
26
+ },
27
+ {
28
+ "Name": "name",
29
+ "Value": "demo"
30
+ },
31
+ {
32
+ "Name": "root",
33
+ "Value": "app/stacks/demo"
34
+ },
35
+ {
36
+ "Name": "type",
37
+ "Value": "stack"
38
+ },
39
+ {
40
+ "Name": "type_dir",
41
+ "Value": "stacks"
42
+ }
43
+ ]