terraspace_hooks 0.2.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/terraspace_hooks/infracost_generator.rb +4 -4
- data/lib/terraspace_hooks/tf_fmt_validator.rb +4 -4
- data/lib/terraspace_hooks/tf_validator.rb +4 -4
- data/lib/terraspace_hooks/tflint_validator.rb +4 -4
- data/lib/terraspace_hooks/tfsec_validator.rb +4 -4
- data/lib/terraspace_hooks/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4699c6d4fca3cfcec68a908f8acd96f933304a352c221adbbce47bc4abdb285b
|
4
|
+
data.tar.gz: abcd6b516c77d16cf76986462baf38528611df0b69d99fc1381bec6c6f20a996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c5e42eb618272843840eb36d81399818d61a9ecef34a5bd5803aeb6d472c1fe9a56332b40f5f74e6b3f0edcf7684d0b5c4389dc167fff4a27137f0a2e9dc5f5
|
7
|
+
data.tar.gz: 1cbb732d925f3bce6cc2836e0d9f67f3d5bea56db26a36feacdabb979a056dc6fd5144b2af6bc968374e7c682505c906a4655f954753bb908005cb17140c1d7f
|
@@ -5,6 +5,9 @@ module TerraspaceHooks
|
|
5
5
|
class InfracostGenerator
|
6
6
|
# rubocop:disable Metrics/MethodLength
|
7
7
|
def call(runner)
|
8
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_ALL']
|
9
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_INFRACOST_GENERATOR']
|
10
|
+
|
8
11
|
raise 'Infracost not available' unless infracost_available?
|
9
12
|
raise 'Terraform not available' unless terraform_available?
|
10
13
|
|
@@ -21,10 +24,7 @@ module TerraspaceHooks
|
|
21
24
|
infracost output --path infracost_breakdown.json --format table --show-skipped
|
22
25
|
COMMAND
|
23
26
|
|
24
|
-
|
25
|
-
return if ENV['SKIP_TERRASPACE_HOOKS_INFRACOST_GENERATOR']
|
26
|
-
|
27
|
-
system(command)
|
27
|
+
system(command, exception: true)
|
28
28
|
end
|
29
29
|
# rubocop:enable Metrics/MethodLength
|
30
30
|
|
@@ -5,6 +5,9 @@ module TerraspaceHooks
|
|
5
5
|
class TfFmtValidator
|
6
6
|
# rubocop:disable Metrics/MethodLength
|
7
7
|
def call(runner)
|
8
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_ALL']
|
9
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_TF_FMT_VALIDATOR']
|
10
|
+
|
8
11
|
raise 'Terraform not available' unless terraform_available?
|
9
12
|
|
10
13
|
mod = runner.mod
|
@@ -16,10 +19,7 @@ module TerraspaceHooks
|
|
16
19
|
terraform fmt
|
17
20
|
COMMAND
|
18
21
|
|
19
|
-
|
20
|
-
return if ENV['SKIP_TERRASPACE_HOOKS_TF_FMT_VALIDATOR']
|
21
|
-
|
22
|
-
system(command)
|
22
|
+
system(command, exception: true)
|
23
23
|
end
|
24
24
|
# rubocop:enable Metrics/MethodLength
|
25
25
|
|
@@ -5,6 +5,9 @@ module TerraspaceHooks
|
|
5
5
|
class TfValidator
|
6
6
|
# rubocop:disable Metrics/MethodLength
|
7
7
|
def call(runner)
|
8
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_ALL']
|
9
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_TF_VALIDATOR']
|
10
|
+
|
8
11
|
raise 'Terraform not available' unless terraform_available?
|
9
12
|
|
10
13
|
mod = runner.mod
|
@@ -16,10 +19,7 @@ module TerraspaceHooks
|
|
16
19
|
terraform validate
|
17
20
|
COMMAND
|
18
21
|
|
19
|
-
|
20
|
-
return if ENV['SKIP_TERRASPACE_HOOKS_TF_VALIDATOR']
|
21
|
-
|
22
|
-
system(command)
|
22
|
+
system(command, exception: true)
|
23
23
|
end
|
24
24
|
# rubocop:enable Metrics/MethodLength
|
25
25
|
|
@@ -5,6 +5,9 @@ module TerraspaceHooks
|
|
5
5
|
class TflintValidator
|
6
6
|
# rubocop:disable Metrics/MethodLength
|
7
7
|
def call(runner)
|
8
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_ALL']
|
9
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_TFLINT_VALIDATOR']
|
10
|
+
|
8
11
|
raise 'Tflint not available' unless tflint_available?
|
9
12
|
|
10
13
|
mod = runner.mod
|
@@ -16,10 +19,7 @@ module TerraspaceHooks
|
|
16
19
|
tflint . --disable-rule=terraform_required_version --module
|
17
20
|
COMMAND
|
18
21
|
|
19
|
-
|
20
|
-
return if ENV['SKIP_TERRASPACE_HOOKS_TFLINT_VALIDATOR']
|
21
|
-
|
22
|
-
system(command)
|
22
|
+
system(command, exception: true)
|
23
23
|
end
|
24
24
|
# rubocop:enable Metrics/MethodLength
|
25
25
|
|
@@ -5,6 +5,9 @@ module TerraspaceHooks
|
|
5
5
|
class TfsecValidator
|
6
6
|
# rubocop:disable Metrics/MethodLength
|
7
7
|
def call(runner)
|
8
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_ALL']
|
9
|
+
return if ENV['SKIP_TERRASPACE_HOOKS_TFSEC_VALIDATOR']
|
10
|
+
|
8
11
|
raise 'Tfsec not available' unless tfsec_available?
|
9
12
|
|
10
13
|
mod = runner.mod
|
@@ -16,10 +19,7 @@ module TerraspaceHooks
|
|
16
19
|
tfsec --concise-output
|
17
20
|
COMMAND
|
18
21
|
|
19
|
-
|
20
|
-
return if ENV['SKIP_TERRASPACE_HOOKS_TFSEC_VALIDATOR']
|
21
|
-
|
22
|
-
system(command)
|
22
|
+
system(command, exception: true)
|
23
23
|
end
|
24
24
|
# rubocop:enable Metrics/MethodLength
|
25
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraspace_hooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- slamet kristanto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
|
-
rubygems_version: 3.4.
|
74
|
+
rubygems_version: 3.4.13
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Useful terraspace hook collection (infracost generator, tflint, tf validate)
|