terraspace 2.1.5 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/terraspace/terraform/args/pass.rb +13 -2
- data/lib/terraspace/version.rb +1 -1
- data/spec/terraspace/terraform/args/pass_spec.rb +13 -0
- 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: 449ffd121de77d38b64d44f30a56639714f27fd3b0a7c50b00c4f897157c9ef5
|
4
|
+
data.tar.gz: 815fddcc7cfa9b01e335de6d160d941c6d1b4a025b6bab902a1aa4552752b9df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc167ec202e62e70dd129d4ac85dc30a4179576315b880303205569434d7e31a35e5d331df64b2e478efb0459fcb902764ec6c860af650ea7ec8dcbc7caefe47
|
7
|
+
data.tar.gz: da40e6f0760f535a0e604aad16b31ddd708090521c070469739a0e13d0129542676951892e1859fd779b4bcbbda15a168e260cd43dc4e41964bbc0a0a28ffb48
|
data/CHANGELOG.md
CHANGED
@@ -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
|
+
## [2.1.6] - 2022-08-19
|
7
|
+
- [#258](https://github.com/boltops-tools/terraspace/pull/258) Fix terraform apply/destroy missing some passthrough options
|
8
|
+
|
6
9
|
## [2.1.5] - 2022-07-21
|
7
10
|
- [#255](https://github.com/boltops-tools/terraspace/pull/255) dont compute git info when not cloud not enabled and warn message improvement
|
8
11
|
- pin terraspace to major version in initially generated Gemfile
|
@@ -60,6 +60,17 @@ module Terraspace::Terraform::Args
|
|
60
60
|
result
|
61
61
|
end
|
62
62
|
|
63
|
+
def terraform_arg_types
|
64
|
+
arg_types = terraform_arg_types_for_command(@name)
|
65
|
+
# "terraspace apply/destroy" support the same options as "plan", but they don't document
|
66
|
+
# them directly in their "-help" option, so we need to add them.
|
67
|
+
if ["apply", "destroy"].include? @name
|
68
|
+
arg_types.merge! terraform_arg_types_for_command("plan")
|
69
|
+
end
|
70
|
+
|
71
|
+
arg_types
|
72
|
+
end
|
73
|
+
|
63
74
|
# Parses terraform COMMAND -help output for arg types.
|
64
75
|
# Return Example:
|
65
76
|
#
|
@@ -69,8 +80,8 @@ module Terraspace::Terraform::Args
|
|
69
80
|
# var: :hash,
|
70
81
|
# }
|
71
82
|
#
|
72
|
-
def
|
73
|
-
out = terraform_help(
|
83
|
+
def terraform_arg_types_for_command(name)
|
84
|
+
out = terraform_help(name)
|
74
85
|
lines = out.split("\n")
|
75
86
|
lines.select! do |line|
|
76
87
|
line =~ /^ -/
|
data/lib/terraspace/version.rb
CHANGED
@@ -51,6 +51,19 @@ describe Terraspace::Terraform::Args::Pass do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
context "indirectly documented args" do
|
55
|
+
# "terraform apply -help" doesn't document "-target" directly, but refers to
|
56
|
+
# "terraform plan -help" documentation.
|
57
|
+
context "-target=resource" do
|
58
|
+
let(:args) { ["-target=foo.bar"] }
|
59
|
+
let(:name) { "apply" }
|
60
|
+
it "pass through args" do
|
61
|
+
args = pass.args
|
62
|
+
expect(args).to eq ["-target=foo.bar"]
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
54
67
|
context "hash arg" do
|
55
68
|
context "-var 'foo=bar'" do
|
56
69
|
let(:args) { ["-var 'foo=bar'"] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|