mux_tf 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/tf_current +3 -0
- data/exe/tf_mux +3 -0
- data/exe/tf_plan_summary +3 -0
- data/lib/mux_tf/cli/current.rb +0 -8
- data/lib/mux_tf/plan_summary_handler.rb +13 -2
- data/lib/mux_tf/terraform_helpers.rb +6 -2
- data/lib/mux_tf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd2c3c9fe3713fedf24899d07fe227d731d6331eef42356934bd3ba2a0f3b68b
|
|
4
|
+
data.tar.gz: 878d5e65dbfe4335b58f2867be76d5d7f91d52702338695c2b0c89d98c0dc615
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91cf73ffb77f5282ebf0bb4186d9eb8ba51a75b58b2767d139c81ecced720cc94a1852ec4bd0d038ec203063500b24ef12712b4e54295c0d308991e9fe393340
|
|
7
|
+
data.tar.gz: 55ea5b19015b5266cec12962a25b41d8a29ea090cab7a9de6381147a70c90c214b995c085862bc0e084582711c99e375f8a7d07871e1bf8c0f8a63f55f7bdba4
|
data/exe/tf_current
CHANGED
data/exe/tf_mux
CHANGED
data/exe/tf_plan_summary
CHANGED
data/lib/mux_tf/cli/current.rb
CHANGED
|
@@ -47,14 +47,6 @@ module MuxTf
|
|
|
47
47
|
when :unknown
|
|
48
48
|
launch_cmd_loop(plan_status)
|
|
49
49
|
end
|
|
50
|
-
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
51
|
-
puts Paint["Unhandled Exception!", :red]
|
|
52
|
-
puts "=" * 20
|
|
53
|
-
puts e.full_message
|
|
54
|
-
puts
|
|
55
|
-
puts "< press enter to continue >"
|
|
56
|
-
gets
|
|
57
|
-
exit 1
|
|
58
50
|
end
|
|
59
51
|
|
|
60
52
|
def plan_filename
|
|
@@ -60,7 +60,7 @@ module MuxTf
|
|
|
60
60
|
}
|
|
61
61
|
else
|
|
62
62
|
puts "[??] #{output_name}"
|
|
63
|
-
puts "UNKNOWN ACTIONS: #{v['actions'].inspect}"
|
|
63
|
+
puts "UNKNOWN OUTPUT ACTIONS: #{v['actions'].inspect}"
|
|
64
64
|
puts "TODO: update plan_summary to support this!"
|
|
65
65
|
end
|
|
66
66
|
end
|
|
@@ -99,6 +99,13 @@ module MuxTf
|
|
|
99
99
|
address: v["address"],
|
|
100
100
|
deps: find_deps(data, v["address"])
|
|
101
101
|
}
|
|
102
|
+
when %w[create delete]
|
|
103
|
+
parts << {
|
|
104
|
+
type: "resource",
|
|
105
|
+
action: "replace (create before delete)",
|
|
106
|
+
address: v["address"],
|
|
107
|
+
deps: find_deps(data, v["address"])
|
|
108
|
+
}
|
|
102
109
|
when ["read"]
|
|
103
110
|
parts << {
|
|
104
111
|
type: "resource",
|
|
@@ -108,7 +115,7 @@ module MuxTf
|
|
|
108
115
|
}
|
|
109
116
|
else
|
|
110
117
|
puts "[??] #{v['address']}"
|
|
111
|
-
puts "UNKNOWN ACTIONS: #{v['change']['actions'].inspect}"
|
|
118
|
+
puts "UNKNOWN RESOURCE ACTIONS: #{v['change']['actions'].inspect}"
|
|
112
119
|
puts "TODO: update plan_summary to support this!"
|
|
113
120
|
end
|
|
114
121
|
end
|
|
@@ -354,6 +361,8 @@ module MuxTf
|
|
|
354
361
|
:red
|
|
355
362
|
when "replace" # rubocop:disable Lint/DuplicateBranch
|
|
356
363
|
:red
|
|
364
|
+
when "replace (create before delete)" # rubocop:disable Lint/DuplicateBranch
|
|
365
|
+
:red
|
|
357
366
|
when "read"
|
|
358
367
|
:cyan
|
|
359
368
|
else
|
|
@@ -370,6 +379,8 @@ module MuxTf
|
|
|
370
379
|
when "delete"
|
|
371
380
|
"-"
|
|
372
381
|
when "replace"
|
|
382
|
+
"∓"
|
|
383
|
+
when "replace (create before delete)"
|
|
373
384
|
"±"
|
|
374
385
|
when "read"
|
|
375
386
|
">"
|
|
@@ -70,12 +70,16 @@ module MuxTf
|
|
|
70
70
|
|
|
71
71
|
private
|
|
72
72
|
|
|
73
|
+
def tf_base_command
|
|
74
|
+
ENV.fetch("MUX_TF_BASE_CMD", "terraform")
|
|
75
|
+
end
|
|
76
|
+
|
|
73
77
|
def tf_prepare_command(args, need_auth:)
|
|
74
78
|
if ENV["MUX_TF_AUTH_WRAPPER"] && need_auth
|
|
75
79
|
words = Shellwords.shellsplit(ENV["MUX_TF_AUTH_WRAPPER"])
|
|
76
|
-
[*words,
|
|
80
|
+
[*words, tf_base_command, *args]
|
|
77
81
|
else
|
|
78
|
-
[
|
|
82
|
+
[tf_base_command, *args]
|
|
79
83
|
end
|
|
80
84
|
end
|
|
81
85
|
|
data/lib/mux_tf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mux_tf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piotr Banasik
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-07-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|