terraspace 0.2.4 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) 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 +39 -1
  6. data/README.md +14 -1
  7. data/lib/templates/base/git_hook/hook.sh +1 -1
  8. data/lib/templates/base/project/.gitignore +1 -0
  9. data/lib/templates/base/project/README.md +17 -0
  10. data/lib/terraspace.rb +6 -0
  11. data/lib/terraspace/all/base.rb +8 -0
  12. data/lib/terraspace/all/grapher.rb +129 -0
  13. data/lib/terraspace/all/preview.rb +43 -0
  14. data/lib/terraspace/all/runner.rb +169 -0
  15. data/lib/terraspace/all/summary.rb +119 -0
  16. data/lib/terraspace/app.rb +31 -9
  17. data/lib/terraspace/booter.rb +9 -0
  18. data/lib/terraspace/builder.rb +59 -22
  19. data/lib/terraspace/cli.rb +60 -33
  20. data/lib/terraspace/cli/all.rb +63 -0
  21. data/lib/terraspace/cli/build/placeholder.rb +2 -5
  22. data/lib/terraspace/cli/bundle.rb +1 -1
  23. data/lib/terraspace/cli/check_setup.rb +5 -0
  24. data/lib/terraspace/cli/cloud.rb +16 -6
  25. data/lib/terraspace/cli/cloud/runs.rb +22 -0
  26. data/lib/terraspace/cli/commander.rb +1 -8
  27. data/lib/terraspace/cli/down.rb +20 -0
  28. data/lib/terraspace/cli/help/all/down.md +32 -0
  29. data/lib/terraspace/cli/help/all/graph.md +21 -0
  30. data/lib/terraspace/cli/help/all/output.md +22 -0
  31. data/lib/terraspace/cli/help/all/plan.md +25 -0
  32. data/lib/terraspace/cli/help/all/providers.md +21 -0
  33. data/lib/terraspace/cli/help/all/refresh.md +17 -0
  34. data/lib/terraspace/cli/help/all/show.md +21 -0
  35. data/lib/terraspace/cli/help/all/up.md +27 -0
  36. data/lib/terraspace/cli/help/all/validate.md +21 -0
  37. data/lib/terraspace/cli/help/build.md +6 -0
  38. data/lib/terraspace/cli/help/bundle.md +9 -5
  39. data/lib/terraspace/cli/help/check_setup.md +9 -0
  40. data/lib/terraspace/cli/help/clean.md +5 -0
  41. data/lib/terraspace/cli/help/cloud/destroy.md +16 -0
  42. data/lib/terraspace/cli/help/cloud/list.md +7 -0
  43. data/lib/terraspace/cli/help/cloud/runs/list.md +36 -0
  44. data/lib/terraspace/cli/help/cloud/runs/prune.md +25 -0
  45. data/lib/terraspace/cli/help/cloud/sync.md +43 -0
  46. data/lib/terraspace/cli/help/console.md +8 -0
  47. data/lib/terraspace/cli/help/down.md +26 -0
  48. data/lib/terraspace/cli/help/info.md +43 -0
  49. data/lib/terraspace/cli/help/init.md +37 -0
  50. data/lib/terraspace/cli/help/list.md +20 -0
  51. data/lib/terraspace/cli/help/log.md +48 -0
  52. data/lib/terraspace/cli/help/logs/remove.md +5 -0
  53. data/lib/terraspace/cli/help/logs/truncate.md +5 -0
  54. data/lib/terraspace/cli/help/new/bootstrap_test.md +8 -0
  55. data/lib/terraspace/cli/help/new/example.md +8 -0
  56. data/lib/terraspace/cli/help/new/git_hook.md +6 -0
  57. data/lib/terraspace/cli/help/new/module.md +9 -0
  58. data/lib/terraspace/cli/help/new/module_test.md +12 -0
  59. data/lib/terraspace/cli/help/new/plugin.md +49 -0
  60. data/lib/terraspace/cli/help/new/project.md +40 -0
  61. data/lib/terraspace/cli/help/new/project_test.md +8 -0
  62. data/lib/terraspace/cli/help/new/shim.md +21 -0
  63. data/lib/terraspace/cli/help/new/stack.md +9 -0
  64. data/lib/terraspace/cli/help/output.md +6 -0
  65. data/lib/terraspace/cli/help/plan.md +29 -0
  66. data/lib/terraspace/cli/help/providers.md +18 -0
  67. data/lib/terraspace/cli/help/refresh.md +11 -0
  68. data/lib/terraspace/cli/help/seed.md +7 -0
  69. data/lib/terraspace/cli/help/show.md +36 -0
  70. data/lib/terraspace/cli/help/summary.md +11 -0
  71. data/lib/terraspace/cli/help/test.md +35 -0
  72. data/lib/terraspace/cli/help/up.md +30 -0
  73. data/lib/terraspace/cli/help/validate.md +9 -0
  74. data/lib/terraspace/cli/info.rb +4 -16
  75. data/lib/terraspace/cli/init.rb +35 -7
  76. data/lib/terraspace/cli/list.rb +14 -1
  77. data/lib/terraspace/cli/log.rb +112 -0
  78. data/lib/terraspace/cli/log/concern.rb +24 -0
  79. data/lib/terraspace/cli/logs.rb +15 -0
  80. data/lib/terraspace/cli/logs/tasks.rb +32 -0
  81. data/lib/terraspace/cli/new.rb +18 -18
  82. data/lib/terraspace/cli/new/git_hook.rb +5 -2
  83. data/lib/terraspace/cli/new/project.rb +1 -1
  84. data/lib/terraspace/cli/summary.rb +2 -2
  85. data/lib/terraspace/cli/tfc_concern.rb +14 -0
  86. data/lib/terraspace/cli/up.rb +32 -0
  87. data/lib/terraspace/command.rb +1 -1
  88. data/lib/terraspace/compiler/backend.rb +10 -0
  89. data/lib/terraspace/compiler/builder.rb +5 -4
  90. data/lib/terraspace/compiler/cleaner.rb +1 -1
  91. data/lib/terraspace/compiler/cleaner/backend_change.rb +21 -7
  92. data/lib/terraspace/compiler/commands_concern.rb +18 -0
  93. data/lib/terraspace/compiler/dirs_concern.rb +47 -0
  94. data/lib/terraspace/compiler/dsl/syntax/helpers/common.rb +26 -1
  95. data/lib/terraspace/core.rb +11 -2
  96. data/lib/terraspace/dependency/graph.rb +140 -0
  97. data/lib/terraspace/dependency/node.rb +38 -0
  98. data/lib/terraspace/dependency/registry.rb +11 -0
  99. data/lib/terraspace/logger.rb +6 -18
  100. data/lib/terraspace/logger/formatter.rb +13 -0
  101. data/lib/terraspace/mod.rb +7 -1
  102. data/lib/terraspace/plugin/summary/interface.rb +1 -1
  103. data/lib/terraspace/seeder/where.rb +6 -2
  104. data/lib/terraspace/shell.rb +107 -0
  105. data/lib/terraspace/terraform/api.rb +7 -45
  106. data/lib/terraspace/terraform/api/base.rb +7 -0
  107. data/lib/terraspace/terraform/api/client.rb +23 -3
  108. data/lib/terraspace/terraform/api/http.rb +14 -34
  109. data/lib/terraspace/terraform/api/http/concern.rb +10 -0
  110. data/lib/terraspace/terraform/api/runs.rb +28 -0
  111. data/lib/terraspace/terraform/api/token.rb +65 -0
  112. data/lib/terraspace/terraform/api/var.rb +20 -6
  113. data/lib/terraspace/terraform/api/vars.rb +2 -1
  114. data/lib/terraspace/terraform/api/workspace.rb +98 -0
  115. data/lib/terraspace/terraform/args/default.rb +48 -21
  116. data/lib/terraspace/terraform/cloud/runs.rb +13 -0
  117. data/lib/terraspace/terraform/cloud/runs/base.rb +33 -0
  118. data/lib/terraspace/terraform/cloud/runs/item_presenter.rb +37 -0
  119. data/lib/terraspace/terraform/cloud/runs/lister.rb +20 -0
  120. data/lib/terraspace/terraform/cloud/runs/pruner.rb +109 -0
  121. data/lib/terraspace/terraform/cloud/sync.rb +41 -0
  122. data/lib/terraspace/terraform/cloud/syncer.rb +52 -0
  123. data/lib/terraspace/terraform/cloud/workspace.rb +10 -30
  124. data/lib/terraspace/terraform/hooks/builder.rb +1 -1
  125. data/lib/terraspace/terraform/remote_state/fetcher.rb +143 -0
  126. data/lib/terraspace/terraform/remote_state/marker/output.rb +39 -0
  127. data/lib/terraspace/terraform/remote_state/marker/pretty_tracer.rb +37 -0
  128. data/lib/terraspace/terraform/remote_state/output_proxy.rb +29 -0
  129. data/lib/terraspace/terraform/runner.rb +24 -14
  130. data/lib/terraspace/util.rb +1 -5
  131. data/lib/terraspace/util/pretty.rb +18 -0
  132. data/lib/terraspace/version.rb +1 -1
  133. data/spec/fixtures/fetcher/c1.json +37 -0
  134. data/spec/fixtures/parser/cache_dirs/all/01-test.auto.tfvars +5 -0
  135. data/spec/fixtures/parser/cache_dirs/depends_on/01-test.auto.tfvars +2 -0
  136. data/spec/fixtures/parser/cache_dirs/output/01-test.auto.tfvars +2 -0
  137. data/spec/fixtures/summary/down.log +12 -0
  138. data/spec/fixtures/summary/output.log +5 -0
  139. data/spec/fixtures/summary/plan/error.log +20 -0
  140. data/spec/fixtures/summary/plan/success.log +17 -0
  141. data/spec/fixtures/summary/show.log +22 -0
  142. data/spec/fixtures/summary/up/error.log +13 -0
  143. data/spec/fixtures/summary/up/success.log +63 -0
  144. data/spec/fixtures/summary/validate/error.log +13 -0
  145. data/spec/fixtures/summary/validate/success.log +5 -0
  146. data/spec/terraspace/all/grapher_spec.rb +38 -0
  147. data/spec/terraspace/all/runner_spec.rb +48 -0
  148. data/spec/terraspace/all/summary_spec.rb +93 -0
  149. data/spec/terraspace/dependency/graph_spec.rb +162 -0
  150. data/spec/terraspace/seeder_spec.rb +0 -1
  151. data/spec/terraspace/terraform/remote_state/fetcher_spec.rb +52 -0
  152. data/terraspace.gemspec +5 -1
  153. metadata +179 -6
  154. data/lib/terraspace/cli/help/update.md +0 -5
  155. data/lib/terraspace/terraform/cloud.rb +0 -25
  156. data/lib/terraspace/util/sh.rb +0 -19
@@ -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
+ $
@@ -0,0 +1,36 @@
1
+ ## Example
2
+
3
+ Statuses of pending and planned are shown by default.
4
+
5
+ $ terraspace cloud runs list demo
6
+ +----------------------+---------+---------------------------------+---------------------+
7
+ | Id | Status | Message | Created At |
8
+ +----------------------+---------+---------------------------------+---------------------+
9
+ | run-AuTXsYU1svQEzQVg | pending | Queued manually using Terraform | 2020-09-18T11:30:41 |
10
+ | run-LuwMibh3ebiG7KQZ | planned | test | 2020-09-17T23:16:36 |
11
+ +----------------------+---------+---------------------------------+---------------------+
12
+ $
13
+
14
+ To see all most recent runs, use `--status all`.
15
+
16
+ $ terraspace cloud runs list demo --status all
17
+ +----------------------+-----------+--------------------------------+---------------------+
18
+ | Id | Status | Message | Created At |
19
+ +----------------------+-----------+--------------------------------+---------------------+
20
+ | run-LuwMibh3ebiG7KQZ | planned | test 3 | 2020-09-17T23:16:36 |
21
+ | run-z9f67TNMRamZiGMR | canceled | test 2 | 2020-09-17T23:15:55 |
22
+ | run-cN3CKT5po29p35Ta | discarded | test | 2020-09-17T22:24:31 |
23
+ | run-rXMd7dm3fHvVsA36 | discarded | Queued from Terraform Cloud UI | 2020-09-17T20:00:20 |
24
+ +----------------------+-----------+--------------------------------+---------------------+
25
+ $
26
+
27
+ You can provide a list of statuses to the `--status` filter option.
28
+
29
+ $ terraspace cloud runs list demo --status canceled discarded
30
+ +----------------------+-----------+--------------------------------+---------------------+
31
+ | Id | Status | Message | Created At |
32
+ +----------------------+-----------+--------------------------------+---------------------+
33
+ | run-gS2m1avc3U4j1fip | canceled | test | 2020-09-17T23:15:43 |
34
+ | run-ojwQ4r7MxuzyK3d9 | discarded | test | 2020-09-17T22:33:00 |
35
+ | run-dczeLQsMc3ya4XnY | canceled | test | 2020-09-17T22:32:55 |
36
+ +----------------------+-----------+--------------------------------+---------------------+
@@ -0,0 +1,25 @@
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
+
3
+ ## Examples
4
+
5
+ terraspace cloud runs prune demo --noop
6
+ terraspace cloud runs prune demo # live run
7
+
8
+ ## Example with Output
9
+
10
+ $ terraspace cloud runs prune demo
11
+ Will keep:
12
+
13
+ run-9muMrjrd22vhsP4u pending test 2020-09-18T12:47:11
14
+
15
+ Will prune:
16
+
17
+ run-fYTDzmKfCQf558UN pending test 2020-09-18T12:46:34
18
+ run-6bgSTattJGpaRn9X pending test 2020-09-18T12:46:28
19
+ run-jDHEtZb3vuFnuXqJ planned test 2020-09-18T12:38:35
20
+
21
+ Are you sure? (y/N) y
22
+ Cancelled run-fYTDzmKfCQf558UN test
23
+ Cancelled run-6bgSTattJGpaRn9X test
24
+ Discarded run-jDHEtZb3vuFnuXqJ test
25
+ $
@@ -0,0 +1,43 @@
1
+ ## Examples
2
+
3
+ Sync all stacks:
4
+
5
+ $ terraspace cloud sync
6
+ About to sync these project stacks with Terraform Cloud workspaces:
7
+
8
+ Stack => Workspace
9
+ demo => demo-dev-us-west-2
10
+ demo2 => demo2-dev-us-west-2
11
+
12
+ A sync does the following for each workspace:
13
+
14
+ 1. Create or update workspace, including the VCS settings.
15
+ 2. Set the working dir.
16
+ 3. Set env and terraform variables.
17
+
18
+ Are you sure? (y/N) y
19
+ Syncing to Terraform Cloud: demo => demo-dev-us-west-2
20
+ Syncing to Terraform Cloud: demo2 => demo2-dev-us-west-2
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
+ ]
@@ -0,0 +1,37 @@
1
+ Typically, Terrasapce auto init should handle initialization. You can run init if you need to though.
2
+
3
+ ## Example
4
+
5
+ $ terraspace init demo
6
+ Building .terraspace-cache/us-west-2/dev/stacks/demo
7
+ Built in .terraspace-cache/us-west-2/dev/stacks/demo
8
+ Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
9
+ => terraform init -get
10
+ Initializing modules...
11
+
12
+ Initializing the backend...
13
+
14
+ Initializing provider plugins...
15
+ - Using previously-installed hashicorp/aws v3.7.0
16
+ - Using previously-installed hashicorp/random v2.3.0
17
+
18
+ The following providers do not have any version constraints in configuration,
19
+ so the latest version was installed.
20
+
21
+ To prevent automatic upgrades to new major versions that may contain breaking
22
+ changes, we recommend adding version constraints in a required_providers block
23
+ in your configuration, with the constraint strings suggested below.
24
+
25
+ * hashicorp/aws: version = "~> 3.7.0"
26
+ * hashicorp/random: version = "~> 2.3.0"
27
+
28
+ Terraform has been successfully initialized!
29
+
30
+ You may now begin working with Terraform. Try running "terraform plan" to see
31
+ any changes that are required for your infrastructure. All Terraform commands
32
+ should now work.
33
+
34
+ If you ever set or change modules or backend configuration for Terraform,
35
+ rerun this command to reinitialize your working directory. If you forget, other
36
+ commands will detect it and remind you to do so if necessary.
37
+ $
@@ -0,0 +1,20 @@
1
+ ## Examples
2
+
3
+ List both modules and stacks.
4
+
5
+ $ terraspace list
6
+ app/modules/example
7
+ app/stacks/demo
8
+ $
9
+
10
+ List only stacks.
11
+
12
+ $ terraspace list -t stack
13
+ app/stacks/demo
14
+ $
15
+
16
+ List only modules.
17
+
18
+ $ terraspace list -t module
19
+ app/modules/example
20
+ $
@@ -0,0 +1,48 @@
1
+ The log commands will filter out the logs for the last ran terraspace command. It does this by filtering for the last found PID in the log files.
2
+
3
+ ## Quick Start
4
+
5
+ Follow all the logs as you're running `terraspace all up`:
6
+
7
+ terraspace log -f
8
+
9
+ Note, Terraspace automatically checks every second for new logs and adds them to be followed.
10
+
11
+ ## View Logs
12
+
13
+ View last 10 lines of each log file.
14
+
15
+ terraspace log up network # view up log on specific stack
16
+ terraspace log up # view all up logs
17
+ terraspace log down # view all down logs
18
+ terraspace log # view all logs: up, down, etc
19
+
20
+ By default, the log command shows the last 10 lines of the logs for each log file. You can use the `-n` option to adjust this.
21
+
22
+ terraspace log -n 2 # view last 2 lines of all logs: up, down, etc
23
+
24
+ To show all logs, use the `-a` option.
25
+
26
+ terraspace log up -a
27
+
28
+ Note, if both an action and stack is specified, then it defaults to showing all logs. If you want not to show all logs, use `--no-all`.
29
+
30
+ ## Tail Logs
31
+
32
+ To tail logs, use the `-f` option.
33
+
34
+ terraspace log up network -f # view up log on specific stack
35
+ terraspace log up -f # view all up logs
36
+ terraspace log down -f # view all down logs
37
+ terraspace log -f # view all logs: up, down, etc
38
+
39
+ ## Timestamps
40
+
41
+ The timestamps are shown by default when you are looking for multiple files. When you specify both the action and stack for a single log file, then timestamps are not shown.
42
+
43
+ terraspace log up # timestamps will be shown in this case
44
+ terraspace log up network # timestamps not be shown in this case
45
+
46
+ To show timestamps:
47
+
48
+ terraspace up up network --timestamps
@@ -0,0 +1,5 @@
1
+ ## Example
2
+
3
+ $ terraspace logs remove
4
+ Removing all files in log/
5
+ $
@@ -0,0 +1,5 @@
1
+ ## Example
2
+
3
+ $ terraspace logs truncate
4
+ Truncating log files in log/
5
+ $
@@ -0,0 +1,8 @@
1
+ ## Example
2
+
3
+ $ terraspace new bootstrap_test
4
+ => Creating test bootstrap structure
5
+ exist
6
+ create .rspec
7
+ create spec/spec_helper.rb
8
+ $
@@ -0,0 +1,8 @@
1
+ ## Example
2
+
3
+ => Creating test for new module: example
4
+ create app/modules/example
5
+ create app/modules/example/main.tf
6
+ create app/modules/example/outputs.tf
7
+ create app/modules/example/variables.tf
8
+ $
@@ -0,0 +1,6 @@
1
+ ## Example
2
+
3
+ $ terraspace new git_hook
4
+ create .git/hooks/pre-push
5
+ chmod .git/hooks/pre-push
6
+ $
@@ -0,0 +1,9 @@
1
+ ## Example
2
+
3
+ $ terraspace new module example
4
+ => Creating test for new module: example
5
+ create app/modules/example
6
+ create app/modules/example/main.tf
7
+ create app/modules/example/outputs.tf
8
+ create app/modules/example/variables.tf
9
+ $
@@ -0,0 +1,12 @@
1
+ ## Example
2
+
3
+ $ terraspace new module_test example
4
+ => Creating module test: example
5
+ exist app/modules/example
6
+ create app/modules/example/test/.rspec
7
+ create app/modules/example/test/Gemfile
8
+ create app/modules/example/test/spec/fixtures/stack/main.tf
9
+ create app/modules/example/test/spec/fixtures/stack/outputs.tf
10
+ create app/modules/example/test/spec/main_spec.rb
11
+ create app/modules/example/test/spec/spec_helper.rb
12
+ $
@@ -0,0 +1,49 @@
1
+ ## Example
2
+
3
+ $ terraspace new plugin mycloud
4
+ => Creating new plugin: mycloud
5
+ create terraspace_plugin_mycloud
6
+ create terraspace_plugin_mycloud/.gitignore
7
+ create terraspace_plugin_mycloud/.rspec
8
+ create terraspace_plugin_mycloud/CHANGELOG.md
9
+ create terraspace_plugin_mycloud/Gemfile
10
+ create terraspace_plugin_mycloud/LICENSE.txt
11
+ create terraspace_plugin_mycloud/README.md
12
+ create terraspace_plugin_mycloud/Rakefile
13
+ create terraspace_plugin_mycloud/bin/console
14
+ create terraspace_plugin_mycloud/bin/setup
15
+ create terraspace_plugin_mycloud/lib/templates/hcl/module/main.tf
16
+ create terraspace_plugin_mycloud/lib/templates/hcl/module/outputs.tf
17
+ create terraspace_plugin_mycloud/lib/templates/hcl/module/variables.tf
18
+ create terraspace_plugin_mycloud/lib/templates/hcl/project/config/terraform/backend.tf
19
+ create terraspace_plugin_mycloud/lib/templates/hcl/project/config/terraform/provider.tf
20
+ create terraspace_plugin_mycloud/lib/templates/hcl/stack/main.tf
21
+ create terraspace_plugin_mycloud/lib/templates/hcl/stack/outputs.tf
22
+ create terraspace_plugin_mycloud/lib/templates/hcl/stack/variables.tf
23
+ create terraspace_plugin_mycloud/lib/templates/ruby/module/main.rb
24
+ create terraspace_plugin_mycloud/lib/templates/ruby/module/outputs.rb
25
+ create terraspace_plugin_mycloud/lib/templates/ruby/module/variables.rb
26
+ create terraspace_plugin_mycloud/lib/templates/ruby/project/config/terraform/backend.rb
27
+ create terraspace_plugin_mycloud/lib/templates/ruby/project/config/terraform/provider.rb
28
+ create terraspace_plugin_mycloud/lib/templates/ruby/stack/main.rb
29
+ create terraspace_plugin_mycloud/lib/templates/ruby/stack/outputs.rb
30
+ create terraspace_plugin_mycloud/lib/templates/ruby/stack/variables.rb
31
+ create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/.rspec
32
+ create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/Gemfile
33
+ create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/fixtures/stack/main.tf
34
+ create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/fixtures/stack/outputs.tf
35
+ create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/fixtures/stack/variables.tf
36
+ create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/main_spec.rb
37
+ create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/spec_helper.rb
38
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud.rb
39
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/autoloader.rb
40
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/clients.rb
41
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/backend.rb
42
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/config.rb
43
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/expander.rb
44
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/layer.rb
45
+ create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/version.rb
46
+ create terraspace_plugin_mycloud/spec/spec_helper.rb
47
+ create terraspace_plugin_mycloud/spec/terraspace_provider_mycloud_spec.rb
48
+ create terraspace_plugin_mycloud/terraspace_plugin_mycloud.gemspec
49
+ $