terrafying 1.7.9 → 1.7.10

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: 43174bc2a2d3f672dd89dbce04472b9d7ccaf77166f53cf4f337c8b33fc21fe3
4
- data.tar.gz: 9e59a6a4e385d3077088e869797da449b62db43ba3222000f0cfd6725979bb4a
3
+ metadata.gz: 86368229c02629676027388525b74e13ea2b7fe9dff7e0da17629c2e45f109d9
4
+ data.tar.gz: 88f521a8c94969e0f1d18ed50ed35fc1c152a4c091f124d2b2cb58e29b0f6145
5
5
  SHA512:
6
- metadata.gz: 5048661bb6d909c3fde40aa6fd30d426025aacd76749c3e8ef18e1e3bf1cda612ab48b9570ddf214880e2ec8984371a59f58643db71e60ed2b889a55e102f0be
7
- data.tar.gz: 42faf59a56321218c25af7bd94c85c4316dc5de1fffb3f132b6ab1b28ca5d5cbcdb880ed01387bf7c9d639c3dc6c7e1c823facd07e777f2f4a39b0b111c2be8b
6
+ metadata.gz: b29c4f8c6677c89211e11bf839d13845d3e542a4bb6b4edc5218874dc090d66f49e45fba954e576113ef91dc3950b6c2bf1b83ee716fe8c3aa412561fbaa09a1
7
+ data.tar.gz: fac26af997b1d309071cfd4ce4e1e8980a9c0433aa975754d2e0d05cc701d2ed77574e4360407eb0f82d57b034d48635992d9c1c8f70039733042dd5f4d90e6a
@@ -199,6 +199,21 @@ module Terrafying
199
199
  [name, spec[:alias]].compact.join('.')
200
200
  end
201
201
 
202
+ def required_provider(name, spec)
203
+ @output['terraform'] ||= {}
204
+ @output['terraform']['required_providers'] ||= {}
205
+ raise "Duplicate required_provider configuration detected for #{name}" if @output['terraform']['required_providers'].key? name.to_s
206
+
207
+ @output['terraform']['required_providers'][name.to_s] = spec
208
+ end
209
+
210
+ def required_version(version)
211
+ @output['terraform'] ||= {}
212
+ raise "required_version already configure" if @output['terraform']['required_version']
213
+
214
+ @output['terraform']['required_version'] = "#{version}"
215
+ end
216
+
202
217
  def key_exists_spec_differs(key, name, spec)
203
218
  @providers.key?(key) && spec != @providers[key][name.to_s]
204
219
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Terrafying
4
- VERSION = '1.7.9' # will be inserted by Drone
4
+ VERSION = '1.7.10' # will be inserted by Drone
5
5
  CLI_VERSION = '0.11.7'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terrafying
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.9
4
+ version: 1.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - uSwitch Limited
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-18 00:00:00.000000000 Z
11
+ date: 2021-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler