rake_terraform 1.16.0.pre.1 → 1.16.0.pre.2

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: 623849fb1a6089c74c2e44710131f0548dc3231d56aedb2e8739a0487779472f
4
+ data.tar.gz: 6b3c225643391f53b5894641f4f857d15676f8b68fd203dea21addb00da9eba7
5
5
  SHA512:
6
- metadata.gz: f6bad9acb193c43b44422f995974010af3296d3f59759a54279eb1436c558c9199c0806480d3e120d914f3538363fa171b74832d3a2f83f943343be0b67b1949
7
- data.tar.gz: f93d1ffa1051d13bb2ae28d91410577bc999d1d485593525ba663cbe583bdef3051e8ceedf20f4d2a412e91efed3f0bc325e34daddca0b7d1f75b21b2a11b58f
6
+ metadata.gz: 20aafd195ba6187d5d5abfcb7f1d5aa75c70ed1c85a1b28ac4122a7648d7b0ccba9a4675580b60584d69b5e93c514f9a23ea73e424ef233a522a94ef335ef85a
7
+ data.tar.gz: 06b14552386bc0fc409b2e12c0bb304c8df8cd6b5675cfb1b5186b200e73fb46006027e8e32e55683a4847654b5e52b6a44ef1cdb999f59bdfddd987cd921734
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.pre.2)
5
5
  colored2 (~> 3.1)
6
6
  rake_dependencies (~> 2.9)
7
7
  rake_factory (~> 0.23)
@@ -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.pre.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson