idlc-sdk-deploy 1.0.0.rc6 → 1.0.0.rc7

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
  SHA1:
3
- metadata.gz: '0805f4e4ae3a4a7950804f0c5d4a2204c688121a'
4
- data.tar.gz: 445b0e06b2265d4bcedc84c98bcdb07d51407935
3
+ metadata.gz: 743c6714fb0084e98069c94deaa5d2e1016364c4
4
+ data.tar.gz: 3ae3ea9ac402200ea21d82bb25d017c3315e024a
5
5
  SHA512:
6
- metadata.gz: 357e09b221657a3b84a46ad3f6d4e7f1f5de9e5f8c2d405b31c0ade1cca8ca8afee75a98e1852905040628fd5f866bad1ba857e3746817eed71c595ff140cd6b
7
- data.tar.gz: 1d26441c6408bf9efa9f389d3e31e86c5c7fc85152042eaaf11e8f263954574d18a8bf0c4f4e876d304c82b2661ad14e699d790f0b9803d014565e3e6ad0bbba
6
+ metadata.gz: 0dbabd8d1f336f8157d8a5fdb7cdd4be679f6b3844cf1c8b9807e50e4afeda0b556165ccd32bea0db0594d3972e35b9e6fdc52e4694c3398fcfd40ef1ad65d74
7
+ data.tar.gz: '062290e6539accb11e0aa192275cfb031ba09761bb99a7f0c8bbfa21ac68e7a949f224be0dc5d3bb103c171b7ddc5ee76639aac72cf7efbfaf3d2937ac7336f3'
@@ -36,15 +36,8 @@ module Idlc
36
36
  def configure_state(bucket, sub_bucket)
37
37
  validate_environment
38
38
 
39
- args = []
40
- args << '-backend=s3'
41
- args << '-backend-config="acl=private"'
42
- args << "-backend-config=\"bucket=#{bucket}\""
43
- args << '-backend-config="encrypt=true"'
44
- args << "-backend-config=\"key=#{sub_bucket}/terraform.tfstate\""
45
- args << "-backend-config=\"region=#{@region}\""
46
-
47
- Terraform::Binary.remote("config #{args.join(' ')}")
39
+ configure_tfstatev8 if Terraform::Binary::config.version.to_i <= 0.8
40
+ configure_tfstatev9 if Terraform::Binary::config.version.to_i > 0.8
48
41
  end
49
42
 
50
43
  def parse(config_file)
@@ -65,6 +58,22 @@ module Idlc
65
58
 
66
59
  private
67
60
 
61
+ def configure_tfstatev8
62
+ args = []
63
+ args << '-backend=s3'
64
+ args << '-backend-config="acl=private"'
65
+ args << "-backend-config=\"bucket=#{bucket}\""
66
+ args << '-backend-config="encrypt=true"'
67
+ args << "-backend-config=\"key=#{sub_bucket}/terraform.tfstate\""
68
+ args << "-backend-config=\"region=#{@region}\""
69
+
70
+ Terraform::Binary.remote("config #{args.join(' ')}")
71
+ end
72
+
73
+ def configure_tfstatev9
74
+ Terraform::Binary.init()
75
+ end
76
+
68
77
  def validate_environment
69
78
  %w[
70
79
  SIZE
@@ -1,5 +1,5 @@
1
1
  module Idlc
2
2
  module Deploy
3
- VERSION = '1.0.0.rc6'.freeze
3
+ VERSION = '1.0.0.rc7'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idlc-sdk-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc6
4
+ version: 1.0.0.rc7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Cazell