iapi-idlc-sdk-deploy 1.0.7 → 1.0.8

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: c730716335ae644fb598acb6beb6d07b72943c274fad92edbb6f3233c3c7632a
4
- data.tar.gz: a262a82d4fa204f81879ddd4818daf27cfb4a30e2838a982b389fbd95ab779ac
3
+ metadata.gz: 8277a90f587392851f9153c900ce9b32adcb3a9c0921919fd0bc1586687f0cd1
4
+ data.tar.gz: 74575497a250b9f25070d070694b22eb20ae8580127d97d6636ec8f25301a755
5
5
  SHA512:
6
- metadata.gz: 6762cb9974de29e8af9971d6061beb35ba0114c32b33ada22104a7d3025de84ac23d7f093aa0af0b66bcba45c9b48e2a7d73edc4bde19bcbe1849b0f16df6c34
7
- data.tar.gz: e0aa13e1fb1e1167d06994fa5ceba540c895f97ca340c71194d162f17c9af3ac3f0a3b1d311a165a7e023309432283422a916d63cbd55a4117d6ca7ec1cc0333
6
+ metadata.gz: '0487b4a0c18f7336202b05d05c7922ba44d28a9e03098f7f02e3ca2735bcc469760f5d05a508a500fa75fc7a165f61a3819d7c95efa2cffe9469bbc13baa5f52'
7
+ data.tar.gz: c94d655c82840373d1673f5f21871fccccacf4ef8eb6be52d1d9a9f29b1d7d4943d544381bef0c2e35d48d705323305afb5105d5b6ef5e9386fd21414f123986
@@ -159,7 +159,8 @@ module Idlc
159
159
  tf_version = Terraform::Binary::config.version.split('.')
160
160
 
161
161
  configure_tfstatev8(bucket, sub_bucket, working_directory) if tf_version[0].to_i == 0 && tf_version[1].to_i <= 8
162
- configure_tfstatev9(bucket, sub_bucket, working_directory) if tf_version[0].to_i >= 0 && tf_version[1].to_i > 8
162
+ configure_tfstatev9(bucket, sub_bucket, working_directory) if tf_version[0].to_i == 0 && tf_version[1].to_i > 8
163
+ configure_tfstatev10(bucket, sub_bucket, working_directory) if tf_version[0].to_i > 0
163
164
  end
164
165
 
165
166
  def parse(config_file)
@@ -203,6 +204,16 @@ module Idlc
203
204
  Terraform::Binary.init("#{args.join(' ')} #{working_directory}")
204
205
  end
205
206
 
207
+ def configure_tfstatev10(bucket, sub_bucket, working_directory)
208
+ args = []
209
+ args << "-backend-config=\"bucket=#{bucket}\""
210
+ args << "-backend-config=\"key=#{sub_bucket}/terraform.tfstate\""
211
+ args << "-backend-config=\"region=#{@region}\""
212
+ args << "-force-copy"
213
+
214
+ Terraform::Binary.init("#{args.join(' ')} -chdir #{working_directory}")
215
+ end
216
+
206
217
  def validate_environment
207
218
  %w[
208
219
  TF_VAR_tfstate_bucket
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iapi-idlc-sdk-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Cazell
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-30 00:00:00.000000000 Z
12
+ date: 2024-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler