TerraformDevKit 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac0b94822f7c2101d5399ef83c58e6e35300c888
4
- data.tar.gz: ca5e44187ad6f852b98cdb7bba6692b34fe9c53a
3
+ metadata.gz: 1bb2e9550e4fe4b1afedbbe53bd09b1befc4373c
4
+ data.tar.gz: 2621429429e717ee745831252ff072004333b93a
5
5
  SHA512:
6
- metadata.gz: 9f5f86d877a2d7f76940508fc04be9d2ddfdf47986c046ecb5af838c65b07b75f88d863b04c0d8ed5d3df7131f2806b6eeba6df04d8954ff46a6fc4b035a2ce4
7
- data.tar.gz: c05e5318a8b9d1e569a649fcb89bbf5e1b5db91c00ecb7ca560db65e25294dbebe0ff6b1d684b1d98d2d40cd92ff0654dbb1284bd8745aa096bf86cd6f85555a
6
+ metadata.gz: 60790c921cbfe92f32914c5698210b20c71aac7777715ffde91a3de008a022a10c8200c1aaa538cf0d934d0b561b0f3359e7fdae8e3d1254a5efe47878ad3abb
7
+ data.tar.gz: 6345817822a746172c679a89259c8d20de6dd3f4fe313f0fe31a62780a24ef5b53e5093998594aa39f08fa728524a3eef553a3e92fb57f84bf55fd5a8cbfd0b4
@@ -24,7 +24,7 @@ module TerraformDevKit
24
24
 
25
25
  private_class_method
26
26
  def self.fix_configuration(env)
27
- raise 'No AWS section in the config file' if Configuration.get('aws').nil?
27
+ !Configuration.get('aws').nil? || (raise 'No AWS section in the config file')
28
28
  if Environment.running_on_jenkins?
29
29
  Configuration.get('aws').delete('profile')
30
30
  elsif Configuration.get('aws').key?('profile')
@@ -1,3 +1,3 @@
1
1
  module TerraformDevKit
2
- VERSION = '0.3.6'.freeze
2
+ VERSION = '0.3.7'.freeze
3
3
  end
data/tasks/devkit.rake CHANGED
@@ -100,7 +100,7 @@ task :apply, [:env] => :prepare do |task, args|
100
100
 
101
101
  invoke('plan', task, env.name)
102
102
 
103
- unless env.local_backend?
103
+ unless env.local_backend? || allow_remote_apply?
104
104
  puts Rainbow("Are you sure you want to apply the above plan?\n" \
105
105
  "Only 'yes' will be accepted.").green
106
106
  response = STDIN.gets.strip
@@ -120,6 +120,11 @@ task :apply, [:env] => :prepare do |task, args|
120
120
  invoke('post_apply', task, env.name, safe_invoke: true)
121
121
  end
122
122
 
123
+ def allow_remote_apply?
124
+ aws = TDK::Configuration.get('aws')
125
+ aws.key?('remote_apply') && aws['remote_apply']
126
+ end
127
+
123
128
  desc 'Tests a local environment'
124
129
  task :test, [:env] do |task, args|
125
130
  env = TDK::Environment.new(args.env)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TerraformDevKit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Jimenez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-14 00:00:00.000000000 Z
11
+ date: 2018-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  version: '0'
232
232
  requirements: []
233
233
  rubyforge_project:
234
- rubygems_version: 2.5.1
234
+ rubygems_version: 2.5.2.1
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: Set of scripts to ease development and testing with Terraform.