rake_terraform 1.16.0.pre.1 → 1.16.0

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: 47f55aa9a595370ed1f405492791f178e0f2e532ac4ae132ab4a9686978ec6be
4
- data.tar.gz: 31709ec776abc2f745c9361693bd0d9b3c657f8b18b7a978e95c14cbefe5d605
3
+ metadata.gz: 74bf717376da59f115bbd700b7ee0c254660a34fe07f4348369a8ad2fa843b52
4
+ data.tar.gz: b7af0c5ca16bda117b66146bc2f09c202c4931ed309154985a61d7da1d3d2047
5
5
  SHA512:
6
- metadata.gz: f6bad9acb193c43b44422f995974010af3296d3f59759a54279eb1436c558c9199c0806480d3e120d914f3538363fa171b74832d3a2f83f943343be0b67b1949
7
- data.tar.gz: f93d1ffa1051d13bb2ae28d91410577bc999d1d485593525ba663cbe583bdef3051e8ceedf20f4d2a412e91efed3f0bc325e34daddca0b7d1f75b21b2a11b58f
6
+ metadata.gz: 63e388a8d5950d2e3b25c6bfac5bf5d44e7001b44be195610d5704d205345c2ddbdd62a5151974d0379d4cf3a96755a4e0f08819067ea15c9cca17e75d2368f0
7
+ data.tar.gz: 604c0ad21b23e6b7c6c566ddfbf16514002e4c5241b019845667b0f2526ceb5b2212400d912b6ab0f52fa5da89a0d509fcd54feff207356474ae0bf06828dc98
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_terraform (1.16.0.pre.1)
4
+ rake_terraform (1.16.0)
5
5
  colored2 (~> 3.1)
6
6
  rake_dependencies (~> 2.9)
7
7
  rake_factory (~> 0.23)
@@ -56,7 +56,7 @@ GEM
56
56
  i18n (1.8.10)
57
57
  concurrent-ruby (~> 1.0)
58
58
  immutable-struct (2.4.1)
59
- lino (2.7.0)
59
+ lino (3.0.0)
60
60
  hamster (~> 3.0)
61
61
  open4 (~> 1.3)
62
62
  listen (3.5.1)
@@ -144,9 +144,9 @@ GEM
144
144
  rubocop (~> 1.0)
145
145
  rubocop-ast (>= 1.1.0)
146
146
  ruby-progressbar (1.11.0)
147
- ruby-terraform (1.1.0)
147
+ ruby-terraform (1.2.0)
148
148
  immutable-struct (~> 2.4)
149
- lino (~> 2.7)
149
+ lino (~> 3.0)
150
150
  ruby2_keywords (0.0.4)
151
151
  ruby_gpg2 (0.8.0)
152
152
  lino (>= 1.5)
@@ -19,6 +19,8 @@ module RakeTerraform
19
19
 
20
20
  parameter :debug, default: false
21
21
 
22
+ parameter :input, default: false
23
+
22
24
  parameter :no_color, default: false
23
25
  parameter :no_backup, default: false
24
26
  parameter :no_print_output, default: false
@@ -27,6 +27,7 @@ module RakeTerraform
27
27
  parameter :state_file
28
28
 
29
29
  parameter :debug, default: false
30
+ parameter :input, default: false
30
31
  parameter :no_color, default: false
31
32
  parameter :no_backup, default: false
32
33
 
@@ -34,36 +35,42 @@ module RakeTerraform
34
35
 
35
36
  parameter :ensure_task_name, default: :'terraform:ensure'
36
37
 
38
+ # rubocop:disable Metrics/BlockLength
39
+
37
40
  action do |t|
38
41
  Colored2.disable! if t.no_color
39
42
 
43
+ module_directory =
44
+ File.join(FileUtils.pwd, t.source_directory)
40
45
  configuration_directory =
41
46
  File.join(t.work_directory, t.source_directory)
42
47
 
43
48
  Kernel.puts "Destroying #{t.configuration_name}".cyan
44
- RubyTerraform.clean(
45
- directory: configuration_directory
46
- )
47
49
 
48
- FileUtils.mkdir_p(File.dirname(configuration_directory))
49
- FileUtils.cp_r(t.source_directory, configuration_directory)
50
+ FileUtils.rm_rf(configuration_directory)
51
+ FileUtils.mkdir_p(configuration_directory)
50
52
 
51
- Dir.chdir(configuration_directory) do
52
- RubyTerraform.init(
53
- backend_config: t.backend_config,
54
- no_color: t.no_color
55
- )
56
- RubyTerraform.destroy(
57
- force: true,
58
- no_color: t.no_color,
59
- no_backup: t.no_backup,
60
- backup: t.backup_file,
61
- state: t.state_file,
62
- vars: t.vars,
63
- var_file: t.var_file
64
- )
65
- end
53
+ RubyTerraform.init(
54
+ chdir: configuration_directory,
55
+ from_module: module_directory,
56
+ backend_config: t.backend_config,
57
+ no_color: t.no_color,
58
+ input: t.input
59
+ )
60
+ RubyTerraform.destroy(
61
+ chdir: configuration_directory,
62
+ force: true,
63
+ input: t.input,
64
+ no_color: t.no_color,
65
+ no_backup: t.no_backup,
66
+ backup: t.backup_file,
67
+ state: t.state_file,
68
+ vars: t.vars,
69
+ var_file: t.var_file
70
+ )
66
71
  end
72
+
73
+ # rubocop:enable Metrics/BlockLength
67
74
  end
68
75
  end
69
76
  end
@@ -25,6 +25,7 @@ module RakeTerraform
25
25
  parameter :state_file
26
26
 
27
27
  parameter :debug, default: false
28
+ parameter :input, default: false
28
29
  parameter :no_color, default: false
29
30
  parameter :no_print_output, default: false
30
31
 
@@ -33,32 +34,32 @@ module RakeTerraform
33
34
  action do |t|
34
35
  Colored2.disable! if t.no_color
35
36
 
37
+ module_directory =
38
+ File.join(FileUtils.pwd, t.source_directory)
36
39
  configuration_directory =
37
40
  File.join(t.work_directory, t.source_directory)
38
41
 
39
42
  Kernel.puts("Output of #{t.configuration_name}".cyan)
40
- RubyTerraform.clean(
41
- directory: configuration_directory
42
- )
43
-
44
- FileUtils.mkdir_p(File.dirname(configuration_directory))
45
- FileUtils.cp_r(t.source_directory, configuration_directory)
46
43
 
47
- Dir.chdir(configuration_directory) do
48
- RubyTerraform.init(
49
- backend_config: t.backend_config,
50
- no_color: t.no_color
51
- )
44
+ FileUtils.rm_rf(configuration_directory)
45
+ FileUtils.mkdir_p(configuration_directory)
52
46
 
53
- output = RubyTerraform.output(
54
- no_color: t.no_color,
55
- state: t.state_file
56
- )
47
+ RubyTerraform.init(
48
+ chdir: configuration_directory,
49
+ from_module: module_directory,
50
+ backend_config: t.backend_config,
51
+ no_color: t.no_color,
52
+ input: t.input
53
+ )
54
+ output = RubyTerraform.output(
55
+ chdir: configuration_directory,
56
+ no_color: t.no_color,
57
+ state: t.state_file
58
+ )
57
59
 
58
- Kernel.puts(output) unless t.no_print_output
60
+ Kernel.puts(output) unless t.no_print_output
59
61
 
60
- output
61
- end
62
+ output
62
63
  end
63
64
  end
64
65
  end
@@ -27,6 +27,7 @@ module RakeTerraform
27
27
  parameter :state_file
28
28
 
29
29
  parameter :debug, default: false
30
+ parameter :input, default: false
30
31
  parameter :no_color, default: false
31
32
 
32
33
  parameter :plan_file
@@ -37,31 +38,33 @@ module RakeTerraform
37
38
  action do |t|
38
39
  Colored2.disable! if t.no_color
39
40
 
41
+ module_directory =
42
+ File.join(FileUtils.pwd, t.source_directory)
40
43
  configuration_directory =
41
44
  File.join(t.work_directory, t.source_directory)
42
45
 
43
46
  Kernel.puts("Planning #{configuration_name}".cyan)
44
- RubyTerraform.clean(
45
- directory: configuration_directory
46
- )
47
47
 
48
- FileUtils.mkdir_p(File.dirname(configuration_directory))
49
- FileUtils.cp_r(t.source_directory, configuration_directory)
48
+ FileUtils.rm_rf(configuration_directory)
49
+ FileUtils.mkdir_p(configuration_directory)
50
50
 
51
- Dir.chdir(configuration_directory) do
52
- RubyTerraform.init(
53
- backend_config: t.backend_config,
54
- no_color: t.no_color
55
- )
56
- RubyTerraform.plan(
57
- no_color: t.no_color,
58
- destroy: t.destroy,
59
- state: t.state_file,
60
- plan: t.plan_file,
61
- vars: t.vars,
62
- var_file: t.var_file
63
- )
64
- end
51
+ RubyTerraform.init(
52
+ chdir: configuration_directory,
53
+ from_module: module_directory,
54
+ backend_config: t.backend_config,
55
+ no_color: t.no_color,
56
+ input: t.input
57
+ )
58
+ RubyTerraform.plan(
59
+ chdir: configuration_directory,
60
+ input: t.input,
61
+ no_color: t.no_color,
62
+ destroy: t.destroy,
63
+ state: t.state_file,
64
+ plan: t.plan_file,
65
+ vars: t.vars,
66
+ var_file: t.var_file
67
+ )
65
68
  end
66
69
  end
67
70
  end
@@ -27,6 +27,7 @@ module RakeTerraform
27
27
  parameter :state_file
28
28
 
29
29
  parameter :debug, default: false
30
+ parameter :input, default: false
30
31
  parameter :no_color, default: false
31
32
  parameter :no_backup, default: false
32
33
 
@@ -34,36 +35,42 @@ module RakeTerraform
34
35
 
35
36
  parameter :ensure_task_name, default: :'terraform:ensure'
36
37
 
38
+ # rubocop:disable Metrics/BlockLength
39
+
37
40
  action do |t|
38
41
  Colored2.disable! if t.no_color
39
42
 
43
+ module_directory =
44
+ File.join(FileUtils.pwd, t.source_directory)
40
45
  configuration_directory =
41
46
  File.join(t.work_directory, t.source_directory)
42
47
 
43
48
  Kernel.puts("Provisioning #{t.configuration_name}".cyan)
44
- RubyTerraform.clean(
45
- directory: configuration_directory
46
- )
47
49
 
48
- FileUtils.mkdir_p(File.dirname(configuration_directory))
49
- FileUtils.cp_r(t.source_directory, configuration_directory)
50
+ FileUtils.rm_rf(configuration_directory)
51
+ FileUtils.mkdir_p(configuration_directory)
50
52
 
51
- Dir.chdir(configuration_directory) do
52
- RubyTerraform.init(
53
- backend_config: t.backend_config,
54
- no_color: t.no_color
55
- )
56
- RubyTerraform.apply(
57
- auto_approve: true,
58
- no_color: t.no_color,
59
- no_backup: t.no_backup,
60
- backup: t.backup_file,
61
- state: t.state_file,
62
- vars: t.vars,
63
- var_file: t.var_file
64
- )
65
- end
53
+ RubyTerraform.init(
54
+ chdir: configuration_directory,
55
+ from_module: module_directory,
56
+ backend_config: t.backend_config,
57
+ no_color: t.no_color,
58
+ input: t.input
59
+ )
60
+ RubyTerraform.apply(
61
+ chdir: configuration_directory,
62
+ auto_approve: true,
63
+ input: t.input,
64
+ no_color: t.no_color,
65
+ no_backup: t.no_backup,
66
+ backup: t.backup_file,
67
+ state: t.state_file,
68
+ vars: t.vars,
69
+ var_file: t.var_file
70
+ )
66
71
  end
72
+
73
+ # rubocop:enable Metrics/BlockLength
67
74
  end
68
75
  end
69
76
  end
@@ -22,11 +22,8 @@ module RakeTerraform
22
22
 
23
23
  parameter :backend_config
24
24
 
25
- parameter :vars, default: {}
26
- parameter :var_file
27
- parameter :state_file
28
-
29
25
  parameter :debug, default: false
26
+ parameter :input, default: false
30
27
  parameter :no_color, default: false
31
28
 
32
29
  parameter :ensure_task_name, default: :'terraform:ensure'
@@ -34,29 +31,27 @@ module RakeTerraform
34
31
  action do |t|
35
32
  Colored2.disable! if t.no_color
36
33
 
34
+ module_directory =
35
+ File.join(FileUtils.pwd, t.source_directory)
37
36
  configuration_directory =
38
37
  File.join(t.work_directory, t.source_directory)
39
38
 
40
39
  Kernel.puts("Validating #{t.configuration_name}".cyan)
41
- RubyTerraform.clean(
42
- directory: configuration_directory
43
- )
44
40
 
45
- FileUtils.mkdir_p(File.dirname(configuration_directory))
46
- FileUtils.cp_r(t.source_directory, configuration_directory)
47
-
48
- Dir.chdir(configuration_directory) do
49
- RubyTerraform.init(
50
- backend_config: t.backend_config,
51
- no_color: t.no_color
52
- )
53
- RubyTerraform.validate(
54
- no_color: t.no_color,
55
- state: t.state_file,
56
- vars: t.vars,
57
- var_file: t.var_file
58
- )
59
- end
41
+ FileUtils.rm_rf(configuration_directory)
42
+ FileUtils.mkdir_p(configuration_directory)
43
+
44
+ RubyTerraform.init(
45
+ chdir: configuration_directory,
46
+ from_module: module_directory,
47
+ backend_config: t.backend_config,
48
+ no_color: t.no_color,
49
+ input: t.input
50
+ )
51
+ RubyTerraform.validate(
52
+ chdir: configuration_directory,
53
+ no_color: t.no_color
54
+ )
60
55
  end
61
56
  end
62
57
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RakeTerraform
4
- VERSION = '1.16.0.pre.1'
4
+ VERSION = '1.16.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_terraform
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0.pre.1
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-09 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2
@@ -348,9 +348,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
348
348
  version: '2.6'
349
349
  required_rubygems_version: !ruby/object:Gem::Requirement
350
350
  requirements:
351
- - - ">"
351
+ - - ">="
352
352
  - !ruby/object:Gem::Version
353
- version: 1.3.1
353
+ version: '0'
354
354
  requirements: []
355
355
  rubygems_version: 3.0.1
356
356
  signing_key: