terraspace 0.5.10 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +2 -2
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +4 -3
  4. data/.github/ISSUE_TEMPLATE/question.md +2 -2
  5. data/CHANGELOG.md +30 -7
  6. data/README.md +2 -0
  7. data/lib/terraspace/app.rb +36 -15
  8. data/lib/terraspace/app/inits.rb +13 -0
  9. data/lib/terraspace/booter.rb +19 -2
  10. data/lib/terraspace/cli.rb +13 -6
  11. data/lib/terraspace/cli/build/placeholder.rb +6 -1
  12. data/lib/terraspace/cli/commander.rb +1 -1
  13. data/lib/terraspace/cli/down.rb +1 -1
  14. data/lib/terraspace/cli/help/{cloud → tfc}/destroy.md +1 -1
  15. data/lib/terraspace/cli/help/{cloud → tfc}/list.md +1 -1
  16. data/lib/terraspace/cli/help/{cloud → tfc}/runs/list.md +3 -3
  17. data/lib/terraspace/cli/help/{cloud → tfc}/runs/prune.md +3 -3
  18. data/lib/terraspace/cli/help/{cloud → tfc}/sync.md +3 -3
  19. data/lib/terraspace/cli/init.rb +21 -8
  20. data/lib/terraspace/cli/state.rb +10 -0
  21. data/lib/terraspace/cli/{cloud.rb → tfc.rb} +3 -3
  22. data/lib/terraspace/cli/{cloud → tfc}/runs.rb +4 -4
  23. data/lib/terraspace/cli/up.rb +5 -3
  24. data/lib/terraspace/compiler/builder.rb +2 -0
  25. data/lib/terraspace/compiler/dirs_concern.rb +11 -1
  26. data/lib/terraspace/compiler/select.rb +28 -0
  27. data/lib/terraspace/compiler/strategy/tfvar.rb +16 -4
  28. data/lib/terraspace/compiler/strategy/tfvar/layer.rb +75 -52
  29. data/lib/terraspace/layering.rb +24 -0
  30. data/lib/terraspace/logger.rb +8 -1
  31. data/lib/terraspace/mod.rb +18 -3
  32. data/lib/terraspace/plugin/expander/friendly.rb +10 -0
  33. data/lib/terraspace/plugin/expander/interface.rb +6 -1
  34. data/lib/terraspace/plugin/summary/interface.rb +1 -1
  35. data/lib/terraspace/shell.rb +16 -1
  36. data/lib/terraspace/shell/error.rb +1 -1
  37. data/lib/terraspace/terraform/api/runs.rb +13 -2
  38. data/lib/terraspace/terraform/api/token.rb +2 -2
  39. data/lib/terraspace/terraform/api/var.rb +1 -1
  40. data/lib/terraspace/terraform/api/vars.rb +1 -1
  41. data/lib/terraspace/terraform/api/vars/base.rb +2 -0
  42. data/lib/terraspace/terraform/api/vars/json.rb +13 -1
  43. data/lib/terraspace/terraform/api/workspace.rb +10 -3
  44. data/lib/terraspace/terraform/args/default.rb +23 -13
  45. data/lib/terraspace/terraform/ihooks/after/plan.rb +17 -0
  46. data/lib/terraspace/terraform/ihooks/base.rb +8 -0
  47. data/lib/terraspace/terraform/ihooks/before/plan.rb +14 -0
  48. data/lib/terraspace/terraform/remote_state/fetcher.rb +1 -1
  49. data/lib/terraspace/terraform/runner.rb +12 -0
  50. data/lib/terraspace/terraform/{cloud → tfc}/runs.rb +1 -1
  51. data/lib/terraspace/terraform/{cloud → tfc}/runs/base.rb +1 -1
  52. data/lib/terraspace/terraform/{cloud → tfc}/runs/item_presenter.rb +1 -1
  53. data/lib/terraspace/terraform/{cloud → tfc}/runs/lister.rb +1 -1
  54. data/lib/terraspace/terraform/{cloud → tfc}/runs/pruner.rb +1 -1
  55. data/lib/terraspace/terraform/{cloud → tfc}/sync.rb +2 -2
  56. data/lib/terraspace/terraform/{cloud → tfc}/syncer.rb +1 -1
  57. data/lib/terraspace/terraform/{cloud → tfc}/workspace.rb +2 -3
  58. data/lib/terraspace/util/pretty.rb +2 -1
  59. data/lib/terraspace/version.rb +1 -1
  60. metadata +26 -19
  61. data/lib/terraspace/app/hooks.rb +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cdf03c4bdbb78f6b313f753247facd1b5a0a81fecef5a2b2bd12e1eee5c34ee
4
- data.tar.gz: '09e04997aa61e94a3eaf4ac4d455a0be4f30e401352dacf57b1e2b403977a511'
3
+ metadata.gz: 02ed3895b8039e7424e31139ce9f8e20c5d4a60142e8d3da64b5a68ce9e52004
4
+ data.tar.gz: 14617bab09a51e8229a209536585b5ff460355ac2c13cef26dd067b37a878cc0
5
5
  SHA512:
6
- metadata.gz: fcb9519b863343ee042eb624c3fc1dd031f7de6bbb1d47c3d02bc3852d5ef68639efea275646222eacc3cbec2c83cb312f74387f425b7fd9d21d98650db47056
7
- data.tar.gz: c2ad72731535c2a0c01ab112bf70d2f68d1c9e4ad10b7a1d28d6c86c7aabfdb2c706d1b0bbba8d7a5523c78c0414cce4d4f49c35e60215bd7f9a303c6b57110e
6
+ metadata.gz: 742c92857e31d85b66e7e232b14facd1745d9a35347e4634732670bd0b011937e4e46bcc7157e83cd9db10025a325004a6b391d21688b1e86c3bacf1ff8e429b
7
+ data.tar.gz: c3010333589ed88a15541a563cde963ae6d9e500acf519911966636563dadb9c698db9cb933945bf243d838d45b8c1fdf151f0602c887d9cbea09250069c3fa5
@@ -1,7 +1,7 @@
1
1
  Please fill out one of the templates on https://github.com/boltops-tools/terraspace/issues/new/choose
2
2
 
3
- If you want to ask a question please do so on sites like StackOverflow.
3
+ If you want to ask a question please do so in the Terraspace category in the BoltOps Community forum: https://community.boltops.com
4
4
 
5
- To be sensitive to everyone's time, we may close issues asking questions without comment. Here are some additional options also https://terraspace.cloud/support/ 👌
5
+ To be sensitive to everyone's time, we may close issues asking questions without comment. Posting your questions in the Terraspace community forum is the best place. It also benefits others by making the questions easier to find. Here are some additional options also https://terraspace.cloud/support/ 👌
6
6
 
7
7
  Thank you!
@@ -15,7 +15,8 @@ issue may be closed without comment. If you repeatedly fail to provide enough
15
15
  details, you may be blocked from ever submitting issues to Terraspace again.
16
16
  Please use your best judgment. 👍
17
17
 
18
- If you are unsure this is a bug in Terraspace, please consider asking your question at sites like StackOverflow.
18
+ If you are unsure this is a bug in Terraspace, please consider asking your question at:
19
+ https://community.boltops.com
19
20
 
20
21
  Thanks!
21
22
  -->
@@ -26,8 +27,8 @@ Thanks!
26
27
  Make sure that you've done all of these. To mark a checkbox done, replace [ ] with [x]. Or after you create the issue you can click the checkbox.
27
28
  -->
28
29
 
29
- - [ ] Upgrade Terraspace: Are you using the latest version of Terraspace? This allows Terraspace to fix issues fast.
30
- - [ ] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on StackOverflow.
30
+ - [ ] Upgrade Terraspace: Are you using the latest version of Terraspace? This allows Terraspace to fix issues fast. There's an Upgrading Guide: https://terraspace.cloud/docs/misc/upgrading/
31
+ - [ ] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.boltops.com
31
32
  - [ ] Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
32
33
 
33
34
  ## My Environment
@@ -7,8 +7,8 @@ assignees: ''
7
7
 
8
8
  ---
9
9
 
10
- The Terraspace issue tracker IS NOT for usage questions! Please post your question at sites like StackOverflow.
10
+ The Terraspace issue tracker IS NOT for usage questions! Please post your question on our dedicated forum at https://community.boltops.com
11
11
 
12
12
  To be sensitive to everyone's time, we may close issues asking questions without comment. If you repeatedly post questions in the issues tracker, you may be blocked from ever submitting issues to Terraspace again. Please use your best judgment. 👍
13
13
 
14
- Here are some additional options also https://terraspace.cloud/support/ 😁
14
+ Posting your questions in the Terraspace community forum benefits others by grouping questions in a dedicated place. Here are some additional options also https://terraspace.cloud/support/ 😁
data/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.6.2] - 2021-03-05
7
+ - [#90](https://github.com/boltops-tools/terraspace/pull/90) Boot hooks: new and improved boot hooks interface
8
+ - remove old config.hooks.on_boot
9
+
10
+ ## [0.6.1] - 2021-03-04
11
+ - [#89](https://github.com/boltops-tools/terraspace/pull/89) rename option to enable_names.expansion
12
+
13
+ ## [0.6.0] - 2021-03-03
14
+ - [#87](https://github.com/boltops-tools/terraspace/pull/87) rename cloud to tfc command and improvements
15
+ - [#88](https://github.com/boltops-tools/terraspace/pull/88) custom layering support
16
+ - Improve stdout handling, so this works: `terraspace show demo --json | jq`
17
+ - `terraspace plan --output plan.save` writes to relative cache path.
18
+ - `terraspace up --plan plan.save` copies plan.save to cache path.
19
+ - Add state command. Initial simple version.
20
+
21
+ ## [0.5.12] - 2021-02-27
22
+ - [#79](https://github.com/boltops-tools/terraspace/pull/79) Fix syntax issue
23
+ - [#85](https://github.com/boltops-tools/terraspace/pull/85) Add all.include_stacks option and fix all.ignore_stacks option when building dependency graph
24
+
25
+ ## [0.5.11] - 2021-02-11
26
+ - [#76](https://github.com/boltops-tools/terraspace/pull/76) dont use auto generated plan when both yes and plan options used
27
+ - fix plan path when 2 stacks of same name run at the same time
28
+
6
29
  ## [0.5.10] - 2020-12-11
7
30
  - [#69](https://github.com/boltops-tools/terraspace/pull/69) require singleton earlier
8
31
 
@@ -100,7 +123,7 @@ This project *loosely tries* to adhere to [Semantic Versioning](http://semver.or
100
123
  * fix build for edge case when app/modules exist but app/stacks do not
101
124
  * terraspace new project: do not generate spec folder by default
102
125
  * improve all output summary
103
- * remove redundant `terraspace cloud setup`, instead use: `terraspace cloud sync`
126
+ * remove redundant `terraspace tfc setup`, instead use: `terraspace tfc sync`
104
127
  * improve terraspace info output
105
128
  * fix integration test pipeline
106
129
 
@@ -119,8 +142,8 @@ This project *loosely tries* to adhere to [Semantic Versioning](http://semver.or
119
142
  * Terraspace log: view and tail log files
120
143
  * Terraspace logs management commands: `terraspace logs truncate` and `terraspace logs remove`
121
144
  * TFC/TFE: Improve support. `config.cloud.vars`, `config.cloud.workspace.attrs`
122
- * TFC commands: terraspace cloud runs list, terraspace cloud runs prune
123
- * TFC VCS also sync as part of deploy. Also separate `terraspace cloud sync` command
145
+ * TFC commands: terraspace tfc runs list, terraspace tfc runs prune
146
+ * TFC VCS also sync as part of deploy. Also separate `terraspace tfc sync` command
124
147
  * Logger improvements: configurable formatter, log to stderr by default
125
148
  * Rename: `cloud.relative_root` to `cloud.working_dir_prefix`
126
149
  * Run a plan to capture the diff as part of `-y` option. IE: `terraspace up demo -y`
@@ -153,11 +176,11 @@ This project *loosely tries* to adhere to [Semantic Versioning](http://semver.or
153
176
  * New expander variables: TYPE_INSTANCE, INSTANCE, CACHE_ROOT. Also added strip trailing - and / behavior.
154
177
  * Timeout for terraform init. The default timeout is 10m and will then print out the terraform init log.
155
178
  * Terraspace 0.2.x is compatible with terraspace\_plugin_aws 0.2.x, terraspace\_plugin_google 0.2.x, and terraspace\_plugin_azurerm 0.2.x
156
- * New commands: terraspace list, terraspace cloud list, terraspace cloud setup, terraspace cloud destroy, terraspace new shim, terraspace new git_hook
179
+ * New commands: terraspace list, terraspace tfc list, terraspace tfc setup, terraspace tfc destroy, terraspace new shim, terraspace new git_hook
157
180
  * terraspace list: list of modules and stacks
158
- * terraspace cloud list: shows list of TFC workspaces
159
- * terraspace cloud setup: setups up TFC workspace for VCS-driven workflow. This automatically happens for the TFC CLI-driven workflow.
160
- * terraspace cloud destroy: destroys the TFC workspace associated with the stack. Can also use the `terraspace down demo --destroy-workspace` option.
181
+ * terraspace tfc list: shows list of TFC workspaces
182
+ * terraspace tfc setup: setups up TFC workspace for VCS-driven workflow. This automatically happens for the TFC CLI-driven workflow.
183
+ * terraspace tfc destroy: destroys the TFC workspace associated with the stack. Can also use the `terraspace down demo --destroy-workspace` option.
161
184
  * terraspace new shim: An quick way to generate a terraspace shim.
162
185
  * terraspace new git_hook: An quick way to set up a git pre-push hook for the TFC VCS-driven workflow.
163
186
  * terraspace down: works even if there's no app/stacks folder. A fake stack is built.
data/README.md CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  The Terraform Framework.
12
12
 
13
+ Please **watch/star** this repo to help grow and support the project.
14
+
13
15
  Official Docs Site: [terraspace.cloud](https://terraspace.cloud)
14
16
 
15
17
  Quick Start Demo:
@@ -1,7 +1,9 @@
1
1
  module Terraspace
2
2
  class App
3
- include Singleton
3
+ extend Memoist
4
4
  include DslEvaluator
5
+ include Singleton
6
+ include Terraspace::Util::Logging
5
7
 
6
8
  attr_reader :config
7
9
  def initialize
@@ -9,15 +11,14 @@ module Terraspace
9
11
  end
10
12
 
11
13
  def defaults
12
- ts_logger = Logger.new(ENV['TS_LOG_PATH'] || $stderr)
13
-
14
14
  config = ActiveSupport::OrderedOptions.new
15
15
  config.all = ActiveSupport::OrderedOptions.new
16
16
  config.all.concurrency = 5
17
17
  config.all.exit_on_fail = ActiveSupport::OrderedOptions.new
18
18
  config.all.exit_on_fail.down = true
19
19
  config.all.exit_on_fail.up = true
20
- config.all.ignore_stacks = []
20
+ config.all.ignore_stacks = nil
21
+ config.all.include_stacks = nil
21
22
  config.allow = ActiveSupport::OrderedOptions.new
22
23
  config.allow.envs = nil
23
24
  config.allow.regions = nil
@@ -28,17 +29,6 @@ module Terraspace
28
29
  config.build.clean_cache = nil # defaults to /full/path/to/.terraspace-cache
29
30
  config.bundle = ActiveSupport::OrderedOptions.new
30
31
  config.bundle.logger = ts_logger
31
- config.cloud = ActiveSupport::OrderedOptions.new
32
- config.cloud.auto_sync = true
33
- config.cloud.hostname = nil
34
- config.cloud.vars = ActiveSupport::OrderedOptions.new
35
- config.cloud.vars.overwrite = true
36
- config.cloud.vars.overwrite_sensitive = true
37
- config.cloud.vars.show_message = "create"
38
- config.cloud.working_dir_prefix = nil
39
- config.cloud.workspace = ActiveSupport::OrderedOptions.new
40
- config.cloud.workspace.attrs = ActiveSupport::OrderedOptions.new
41
- config.hooks = Hooks.new
42
32
  config.init = ActiveSupport::OrderedOptions.new
43
33
  config.init.mode = "auto" # auto, never, always
44
34
  config.log = ActiveSupport::OrderedOptions.new
@@ -46,22 +36,53 @@ module Terraspace
46
36
  config.logger = ts_logger
47
37
  config.logger.formatter = Logger::Formatter.new
48
38
  config.logger.level = ENV['TS_LOG_LEVEL'] || :info
39
+ config.layering = ActiveSupport::OrderedOptions.new
40
+ config.layering.names = {}
41
+ config.layering.enable_names = ActiveSupport::OrderedOptions.new
42
+ config.layering.enable_names.expansion = true
43
+ config.summary = ActiveSupport::OrderedOptions.new
44
+ config.summary.prune = false
49
45
  config.terraform = ActiveSupport::OrderedOptions.new
50
46
  config.terraform.plugin_cache = ActiveSupport::OrderedOptions.new
51
47
  config.terraform.plugin_cache.dir = ENV['TF_PLUGIN_CACHE_DIR'] || "#{Terraspace.tmp_root}/plugin_cache"
52
48
  config.terraform.plugin_cache.enabled = true
53
49
  config.terraform.plugin_cache.purge_on_error = true
54
50
  config.test_framework = "rspec"
51
+ config.tfc = ActiveSupport::OrderedOptions.new
52
+ config.tfc.auto_sync = true
53
+ config.tfc.hostname = nil
54
+ config.tfc.vars = ActiveSupport::OrderedOptions.new
55
+ config.tfc.vars.overwrite = true
56
+ config.tfc.vars.overwrite_sensitive = true
57
+ config.tfc.vars.show_message = "create"
58
+ config.tfc.working_dir_prefix = nil
59
+ config.tfc.workspace = ActiveSupport::OrderedOptions.new
60
+ config.tfc.workspace.attrs = ActiveSupport::OrderedOptions.new
55
61
  config
56
62
  end
57
63
 
64
+ def ts_logger
65
+ Logger.new(ENV['TS_LOG_PATH'] || $stderr)
66
+ end
67
+ memoize :ts_logger
68
+
58
69
  def configure
59
70
  yield(@config)
60
71
  end
61
72
 
62
73
  def load_project_config
63
74
  evaluate_file("#{Terraspace.root}/config/app.rb")
75
+
76
+ # deprecated config/env for config/envs
64
77
  path = "#{Terraspace.root}/config/env/#{Terraspace.env}.rb"
78
+ if File.exist?(path)
79
+ # so early on in the boot process that logger.info is unavailable, use ts_logger which is available and same thing.
80
+ ts_logger.info "DEPRECATED: Please rename config/env to config/envs. IE:".color(:yellow)
81
+ ts_logger.info " mv config/env config/envs"
82
+ evaluate_file(path)
83
+ end
84
+
85
+ path = "#{Terraspace.root}/config/envs/#{Terraspace.env}.rb"
65
86
  evaluate_file(path)
66
87
  end
67
88
  end
@@ -0,0 +1,13 @@
1
+ class Terraspace::App
2
+ class Inits
3
+ class << self
4
+ include DslEvaluator
5
+
6
+ def run_all
7
+ Dir.glob("#{Terraspace.root}/config/inits/*.rb").each do |path|
8
+ evaluate_file(path)
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,10 +1,10 @@
1
1
  module Terraspace
2
2
  module Booter
3
3
  def boot
4
+ run_hooks
4
5
  Terraspace::Bundle.require # load plugins
5
6
  load_plugin_default_configs
6
- Terraspace.config # load project config
7
- Terraspace::App::Hooks.run_hook(:on_boot)
7
+ Terraspace::App::Inits.run_all
8
8
  set_plugin_cache!
9
9
  end
10
10
 
@@ -23,6 +23,23 @@ module Terraspace
23
23
  dir
24
24
  end
25
25
 
26
+ # Special boot hooks run super early, even before plugins are loaded.
27
+ # Useful for setting env vars and other early things.
28
+ #
29
+ # config/boot.rb
30
+ # config/boot/dev.rb
31
+ #
32
+ def run_hooks
33
+ run_hook
34
+ run_hook(Terraspace.env)
35
+ end
36
+
37
+ def run_hook(env=nil)
38
+ name = env ? "boot/#{env}" : "boot"
39
+ path = "#{Terraspace.root}/config/#{name}.rb"
40
+ require path if File.exist?(path)
41
+ end
42
+
26
43
  extend self
27
44
  end
28
45
  end
@@ -10,7 +10,7 @@ module Terraspace
10
10
  option :format, desc: "output formats: json, text"
11
11
  }
12
12
  out_option = Proc.new {
13
- option :out, aliases: :o, desc: "write the output to path"
13
+ option :out, aliases: :o, desc: "Write the output to path"
14
14
  }
15
15
  input_option = Proc.new {
16
16
  option :input, type: :boolean, desc: "Ask for input for variables if not directly set."
@@ -36,14 +36,14 @@ module Terraspace
36
36
  long_desc Help.text(:clean)
37
37
  subcommand "clean", Clean
38
38
 
39
- desc "cloud SUBCOMMAND", "cloud subcommands"
40
- long_desc Help.text(:cloud)
41
- subcommand "cloud", Cloud
42
-
43
39
  desc "new SUBCOMMAND", "new subcommands"
44
40
  long_desc Help.text(:new)
45
41
  subcommand "new", New
46
42
 
43
+ desc "tfc SUBCOMMAND", "tfc subcommands"
44
+ long_desc Help.text(:tfc)
45
+ subcommand "tfc", Tfc
46
+
47
47
  desc "build [STACK]", "Build project."
48
48
  long_desc Help.text(:build)
49
49
  option :quiet, type: :boolean, desc: "quiet output"
@@ -123,6 +123,7 @@ module Terraspace
123
123
  instance_option.call
124
124
  out_option.call
125
125
  reconfigure_option.call
126
+ option :copy_to_root, type: :boolean, default: true, desc: "Copy plan file generated in the cache folder back to project root"
126
127
  def plan(mod)
127
128
  Commander.new("plan", options.merge(mod: mod)).run
128
129
  end
@@ -144,7 +145,7 @@ module Terraspace
144
145
  desc "seed STACK", "Build starer seed tfvars file."
145
146
  long_desc Help.text(:seed)
146
147
  option :yes, aliases: :y, type: :boolean, desc: "bypass prompts and force overwrite files"
147
- option :where, desc: "where to create file. either under app or seed folder structure. values: app or stack"
148
+ option :where, desc: "where to create file. either under app or seed folder structure. values: seed or stack"
148
149
  init_option.call
149
150
  instance_option.call
150
151
  def seed(mod)
@@ -169,6 +170,12 @@ module Terraspace
169
170
  Commander.new("show", options.merge(mod: mod)).run
170
171
  end
171
172
 
173
+ desc "state SUBCOMMAND STACK", "Run state."
174
+ long_desc Help.text(:state)
175
+ def state(subcommand, mod)
176
+ State.new(options.merge(subcommand: subcommand, mod: mod)).run
177
+ end
178
+
172
179
  desc "test", "Run test."
173
180
  long_desc Help.text(:test)
174
181
  def test
@@ -26,7 +26,12 @@ module Terraspace::CLI::Build
26
26
 
27
27
  # Used by: terraspace build placeholder
28
28
  def find_stack
29
- mod_path = Dir.glob("{app,vendor}/stacks/*").last
29
+ stack_paths = Dir.glob("{app,vendor}/stacks/*")
30
+ stack_paths.select! do |path|
31
+ select = Terraspace::Compiler::Select.new(path)
32
+ select.selected?
33
+ end
34
+ mod_path = stack_paths.last
30
35
  unless mod_path
31
36
  logger.info "No stacks found."
32
37
  exit 0
@@ -7,7 +7,7 @@ class Terraspace::CLI
7
7
 
8
8
  def run
9
9
  Terraspace::Builder.new(@options).run unless @options[:build] # Up already ran build
10
- Init.new(@options.merge(calling_command: @name)).run
10
+ Init.new(@options).run
11
11
  Terraspace::Terraform::Runner.new(@name, @options).run
12
12
  end
13
13
  end
@@ -14,7 +14,7 @@ class Terraspace::CLI
14
14
 
15
15
  def destroy
16
16
  Commander.new("destroy", @options.merge(command: "down")).run
17
- Terraspace::Terraform::Cloud::Workspace.new(@options).destroy if @options[:destroy_workspace]
17
+ Terraspace::Terraform::Tfc::Workspace.new(@options).destroy if @options[:destroy_workspace]
18
18
  end
19
19
  end
20
20
  end
@@ -1,6 +1,6 @@
1
1
  ## Example
2
2
 
3
- $ terraspace cloud destroy demo
3
+ $ terraspace tfc destroy demo
4
4
  You are about to delete the workspace: demo-dev-us-west-2
5
5
  All variables, settings, run history, and state history will be removed.
6
6
  This cannot be undone.
@@ -1,6 +1,6 @@
1
1
  ## Example
2
2
 
3
- $ terraspace cloud list
3
+ $ terraspace tfc list
4
4
  Workspaces for boltops:
5
5
  demo-dev-us-west-2
6
6
  demo2-dev-us-west-2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Statuses of pending and planned are shown by default.
4
4
 
5
- $ terraspace cloud runs list demo
5
+ $ terraspace tfc 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 demo --status all
16
+ $ terraspace tfc 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 demo --status canceled discarded
29
+ $ terraspace tfc runs list demo --status canceled discarded
30
30
  +----------------------+-----------+--------------------------------+---------------------+
31
31
  | Id | Status | Message | Created At |
32
32
  +----------------------+-----------+--------------------------------+---------------------+
@@ -2,12 +2,12 @@ This leaves the top run alone. The top run usually starts immediately planning o
2
2
 
3
3
  ## Examples
4
4
 
5
- terraspace cloud runs prune demo --noop
6
- terraspace cloud runs prune demo # live run
5
+ terraspace tfc runs prune demo --noop
6
+ terraspace tfc runs prune demo # live run
7
7
 
8
8
  ## Example with Output
9
9
 
10
- $ terraspace cloud runs prune demo
10
+ $ terraspace tfc runs prune demo
11
11
  Will keep:
12
12
 
13
13
  run-9muMrjrd22vhsP4u pending test 2020-09-18T12:47:11
@@ -2,7 +2,7 @@
2
2
 
3
3
  Sync all stacks:
4
4
 
5
- $ terraspace cloud sync
5
+ $ terraspace tfc sync
6
6
  About to sync these project stacks with Terraform Cloud workspaces:
7
7
 
8
8
  Stack => Workspace
@@ -22,7 +22,7 @@ Sync all stacks:
22
22
 
23
23
  Sync specific stacks:
24
24
 
25
- $ terraspace cloud sync demo
25
+ $ terraspace tfc sync demo
26
26
  About to sync these project stacks with Terraform Cloud workspaces:
27
27
 
28
28
  Stack => Workspace
@@ -40,4 +40,4 @@ Sync specific stacks:
40
40
 
41
41
  Can also specify multiple stacks:
42
42
 
43
- terraspace cloud sync demo demo2
43
+ terraspace tfc sync demo demo2