iapi-idlc-sdk-deploy 1.0.7 → 1.0.9

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: ab95acec6791a638fd23c6801d076578165c14da14b6f42a9e3e0c919cdb67de
4
+ data.tar.gz: bd7714a3c30fbb538f8089516f2fedfd807dc93a71a92dbf0f9464e8f510e27c
5
5
  SHA512:
6
- metadata.gz: 6762cb9974de29e8af9971d6061beb35ba0114c32b33ada22104a7d3025de84ac23d7f093aa0af0b66bcba45c9b48e2a7d73edc4bde19bcbe1849b0f16df6c34
7
- data.tar.gz: e0aa13e1fb1e1167d06994fa5ceba540c895f97ca340c71194d162f17c9af3ac3f0a3b1d311a165a7e023309432283422a916d63cbd55a4117d6ca7ec1cc0333
6
+ metadata.gz: 0457e2aed05fbafc45dd1d55a1891d36b85e9771b8b62a1549dac002c1a67f50479ca3bd9932cc241808ba5913e9f59de0cf457b24827a6a09eb604e2f625fea
7
+ data.tar.gz: 86d9bb00f2a4cb08c0178ec9b47ea910c0749c2d99ee14797ccb11a9b59271488f284233fff61e56acb4964facae797d58951d93f86ffcc532f48212cc15b466
@@ -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::Command.run("-chdir #{working_directory} init #{args.join(' ')}")
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.9
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