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 +4 -4
- data/lib/idlc-sdk-deploy/config.rb +18 -9
- data/lib/idlc-sdk-deploy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 743c6714fb0084e98069c94deaa5d2e1016364c4
|
4
|
+
data.tar.gz: 3ae3ea9ac402200ea21d82bb25d017c3315e024a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
40
|
-
|
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
|