terraspace 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6c5d0afc0bdc18ff6f10c79369d60f8a722ecede426ce37880993e5f9676860
4
- data.tar.gz: 3abc9b03ef0a7766491116747fa0d0b6a0fe7d41fc67098e8d2d08a8c30e4a0f
3
+ metadata.gz: fca27946f9c3b224b7bc637249c08f38f5873c0c6b5355515e87a8e3f5400bd2
4
+ data.tar.gz: 02a9f77943aade0e9747df6f21e534afa00343f33a35bf7c03b428be4d5e5ce9
5
5
  SHA512:
6
- metadata.gz: 680b8fed8c8487b85b27007750106944aad12606aa5a3bcffef40c249312b03a957867e8bf4c42a6ba4f332b498db031d48ae63875623c436b0fd89ab73fe8f7
7
- data.tar.gz: 7fc9f978acf6d5759a892530e57ea42839f10201a5cbf14d5db46256d382a1b1b2c86744f4b47f930ee20a2944dff30c58d7d9c406d810e93fc9f73535f1bc9c
6
+ metadata.gz: 453e76c3bd6d6e7732720faec48770451240c3b5eb902aa9b6cd9d1e621c53cf77927eeb87ad680a7639707319d7a384aed4453c9c839532ac89d51597b75adf
7
+ data.tar.gz: 7dbf396731afceda8cfa54b2ecee8d22d017a668289eb86f78588b9356bafa169d6a602ca4a38ea1bfb7f787f184eee2dcef90b357017a87c8aa5a1d917d5936
@@ -3,6 +3,9 @@
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.3.1]
7
+ * #39 fix backend auto creation
8
+
6
9
  ## [0.3.0]
7
10
  * All commands: Dependency graph calculated and deployed in proper order
8
11
  * All commands: `terraspace all up`, `terraspace all build`, `terraspace all down`, etc. `terraspace all -h`
@@ -23,7 +26,8 @@ This project *loosely tries* to adhere to [Semantic Versioning](http://semver.or
23
26
  * Terraspace seed: fix instance option
24
27
 
25
28
  ## [0.2.4]
26
- - fix version check for some versions of terraform
29
+ * fix version check for some versions of terraform
30
+
27
31
  ## [0.2.3]
28
32
  * #37 config.clean_cache option
29
33
 
@@ -14,6 +14,7 @@ module Terraspace
14
14
  logger.info "Building #{build_dir}" unless @options[:quiet] # from terraspace all
15
15
 
16
16
  build_unresolved
17
+ auto_create_backend
17
18
  batches = build_batches
18
19
  build_all
19
20
  logger.info "Built in #{build_dir}" unless @options[:quiet] # from terraspace all
@@ -54,6 +55,17 @@ module Terraspace
54
55
  end
55
56
  end
56
57
 
58
+ # Auto create after build_unresolved since will need to run state pull for dependencies
59
+ def auto_create_backend
60
+ return unless create_backend?
61
+ Terraspace::Compiler::Backend.new(@mod).create
62
+ end
63
+
64
+ def create_backend?
65
+ ARGV[0] == "up" || # terraspace up
66
+ ARGV[0] == "all" && ARGV[1] == "up" # terraspace up
67
+ end
68
+
57
69
  def clean
58
70
  Compiler::Cleaner.new(@mod, @options).clean if clean?
59
71
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen