domed-city 3.0.0 → 3.0.1

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: 6cc7ecbabc62d32ad05359b3c283be1e67407ef8
4
- data.tar.gz: 4468f74c45e4817503a079992fc27b69e019e88a
3
+ metadata.gz: dfb7e4a9a5f9c16f580669b1bc182dc1f617847a
4
+ data.tar.gz: 85b9252a348897c7aeae9544d53ab7ae3f1e097f
5
5
  SHA512:
6
- metadata.gz: b86362790fb01c9523938cbee392e3760a44498c58bdce70c0107566bdcf204ed033478dc89ebbce2e338a01e5322f9ece813c7617b1c8aaa7f56725066668c5
7
- data.tar.gz: 5109c87e9fe98d85dfd30e08c5f3a016676d8ce6955162d6908316b78224735a211ea7fbc01327cdec436f8e086f4a001efb688247fe15913a9580c21b17f099
6
+ metadata.gz: 9e06ae2c8a29c882d6dcdc6b88c81c973f932fad476aeabc4740e37fb572e25661fc4a2126dde18f1082eb78369283721d7abd1b9c890a2f6557019b309e58a5
7
+ data.tar.gz: 59cbc4bf3e339285be30a35524239e7bb793a57ce84f70fc54fdd3d099ec831c6d0b8e202ffbcfb87cf736c93212b3b2eecb976b527c3069d22693b3d69c26c8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 3.0.1
2
+
3
+ Forcibly unsetting environment variables `AWS_ACCESS_KEY` and `AWS_SECRET_KEY`.
4
+ This is to prevent bypassing the user's local credentials specified in `~/.aws/credentials`.
5
+
6
+ Fixed bug where `dome --state` needed to be called first when setting up a new environment.
7
+ This requires some further testing but we may wish to remove this CLI option in the future.
8
+
1
9
  # 3.0.0
2
10
 
3
11
  Thanks to [@Russell-IO](https://github.com/Russell-IO) for helping with these changes.
data/README.md CHANGED
@@ -50,6 +50,3 @@ where [commands] are:
50
50
  -v, --version Print version and exit
51
51
  -h, --help Show this message
52
52
  ```
53
- ### NOTICE
54
-
55
- When used for the first time in an environment you need to run `dome -s` for domed-city to create the S3 bucket and and enable file versioning on it. If you run it after the bucket has been created, it will just sync the remote state, something planning already does by default.
@@ -20,6 +20,13 @@ module Dome
20
20
  @settings.parse['environments']
21
21
  end
22
22
 
23
+ def unset_aws_keys
24
+ puts 'Unsetting environment variables '\
25
+ "#{'AWS_ACCESS_KEY'.colorize(:green)} and #{'AWS_SECRET_KEY'.colorize(:green)}"
26
+ ENV['AWS_ACCESS_KEY'] = nil
27
+ ENV['AWS_SECRET_KEY'] = nil
28
+ end
29
+
23
30
  def aws_credentials
24
31
  puts "Setting environment variable #{'AWS_PROFILE'.colorize(:green)} to your "\
25
32
  "'account' name: #{@account.colorize(:green)}"
@@ -31,6 +31,7 @@ module Dome
31
31
  puts "Project: #{@environment.project.colorize(:green)}"
32
32
  puts "State S3 bucket name: #{@state.state_bucket_name.colorize(:green)}"
33
33
  puts "State file name: #{@state.state_file_name.colorize(:green)}"
34
+ @environment.unset_aws_keys
34
35
  @environment.aws_credentials
35
36
  puts '----------------------------------------------------------------'
36
37
  end
@@ -39,7 +40,7 @@ module Dome
39
40
  delete_terraform_directory
40
41
  delete_plan_file
41
42
  install_terraform_modules
42
- @state.synchronise_s3_state(@state.state_bucket_name, @state.state_file_name)
43
+ @state.s3_state
43
44
  create_plan
44
45
  end
45
46
 
data/lib/dome/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dome
2
- VERSION = '3.0.0'.freeze
2
+ VERSION = '3.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: domed-city
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ITV
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-30 00:00:00.000000000 Z
11
+ date: 2016-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler