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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rake_terraform/tasks/destroy.rb +27 -20
- data/lib/rake_terraform/tasks/output.rb +19 -18
- data/lib/rake_terraform/tasks/plan.rb +22 -19
- data/lib/rake_terraform/tasks/provision.rb +27 -20
- data/lib/rake_terraform/tasks/validate.rb +17 -22
- data/lib/rake_terraform/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623849fb1a6089c74c2e44710131f0548dc3231d56aedb2e8739a0487779472f
|
4
|
+
data.tar.gz: 6b3c225643391f53b5894641f4f857d15676f8b68fd203dea21addb00da9eba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20aafd195ba6187d5d5abfcb7f1d5aa75c70ed1c85a1b28ac4122a7648d7b0ccba9a4675580b60584d69b5e93c514f9a23ea73e424ef233a522a94ef335ef85a
|
7
|
+
data.tar.gz: 06b14552386bc0fc409b2e12c0bb304c8df8cd6b5675cfb1b5186b200e73fb46006027e8e32e55683a4847654b5e52b6a44ef1cdb999f59bdfddd987cd921734
|
data/Gemfile.lock
CHANGED
@@ -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.
|
49
|
-
FileUtils.
|
50
|
+
FileUtils.rm_rf(configuration_directory)
|
51
|
+
FileUtils.mkdir_p(configuration_directory)
|
50
52
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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
|
-
|
48
|
-
|
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
|
-
|
54
|
-
|
55
|
-
|
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
|
-
|
60
|
+
Kernel.puts(output) unless t.no_print_output
|
59
61
|
|
60
|
-
|
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.
|
49
|
-
FileUtils.
|
48
|
+
FileUtils.rm_rf(configuration_directory)
|
49
|
+
FileUtils.mkdir_p(configuration_directory)
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
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.
|
49
|
-
FileUtils.
|
50
|
+
FileUtils.rm_rf(configuration_directory)
|
51
|
+
FileUtils.mkdir_p(configuration_directory)
|
50
52
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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.
|
46
|
-
FileUtils.
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
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
|