stalkedbybean 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stalkedbybean/role_setup.rb +2 -2
- data/lib/stalkedbybean/secrets_setup.rb +3 -3
- data/lib/stalkedbybean/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c68bb884a6a5e3a25be3fd0a80ac1c8fd624743b951c045083053e5fa435ad76
|
4
|
+
data.tar.gz: ac9b03be9583c2fd10278c18d9e65a463b638f6213805b15624397f3263733ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d78f331ab2fe43eadac2d060d1fa460c5edfaf99d3f62bc73c351a70279b3f65d14afc2b4ae74e92aecab721f3cc04e8302314d2e2f0c5724b6fc766f7ed6802
|
7
|
+
data.tar.gz: 5d0670f4b8952625c778ec80f5747971b4520d870a7d700bb33841ba89d525915a84fb28c4df39b2f550c3e3f65db3d7b556f319d30ad8fb848f77f9cd4a46a2
|
@@ -8,12 +8,12 @@ module Stalkedbybean
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.setup_IAM
|
11
|
-
|
11
|
+
|
12
12
|
@app_tag = "#{@options[:app_name]}-#{@options[:environment]}"
|
13
13
|
@client = Aws::IAM::Client.new(region: "#{@options[:aws_region]}", profile: "#{@options[:aws_profile]}")
|
14
14
|
@iam = Aws::IAM::Resource.new(client: @client)
|
15
15
|
|
16
|
-
role_name = "#{@app_tag}-beanstalk-EC2"
|
16
|
+
role_name = "#{@app_tag}-#{@options[:aws_region]}-beanstalk-EC2"
|
17
17
|
|
18
18
|
begin
|
19
19
|
role = self.create_role
|
@@ -13,7 +13,7 @@ module Stalkedbybean
|
|
13
13
|
@client = Aws::KMS::Client.new(region: "#{@options[:aws_region]}", profile: "#{@options[:aws_profile]}")
|
14
14
|
key = @client.create_key({})
|
15
15
|
@client.create_alias({
|
16
|
-
alias_name: "alias/#{@
|
16
|
+
alias_name: "alias/#{@app_tag}",
|
17
17
|
target_key_id: key[:key_metadata][:key_id]
|
18
18
|
})
|
19
19
|
|
@@ -27,7 +27,7 @@ module Stalkedbybean
|
|
27
27
|
|
28
28
|
def self.add_secret(key, value)
|
29
29
|
raise(StandardError, "Missing or invalid key/value") if key == nil || value == nil
|
30
|
-
system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@
|
30
|
+
system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@app_tag} #{key} #{value}")
|
31
31
|
end
|
32
32
|
|
33
33
|
def self.get_secret(key)
|
@@ -42,7 +42,7 @@ module Stalkedbybean
|
|
42
42
|
def self.change_secret(key, value, version)
|
43
43
|
raise(StandardError, "Missing or invalid key/value") if key == nil || value == nil
|
44
44
|
raise(StandardError, "Missing version number") if version == nil
|
45
|
-
system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@
|
45
|
+
system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@app_tag} -v #{version} #{key} #{value}")
|
46
46
|
end
|
47
47
|
|
48
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stalkedbybean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kavita Kalaichelvan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-04-
|
12
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|