awful 0.0.174 → 0.0.175
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/acm +1 -1
- data/bin/alb +1 -1
- data/bin/ami +1 -1
- data/bin/apigw +1 -1
- data/bin/asg +1 -1
- data/bin/asgn +1 -1
- data/bin/certs +1 -1
- data/bin/cf +1 -1
- data/bin/cloudfront +1 -1
- data/bin/cwevents +1 -1
- data/bin/cwlogs +1 -1
- data/bin/dp +1 -1
- data/bin/dyn +1 -1
- data/bin/ec2 +1 -1
- data/bin/ecr +1 -1
- data/bin/ecs +1 -1
- data/bin/eip +1 -1
- data/bin/elasticache +1 -1
- data/bin/elb +1 -1
- data/bin/iam +1 -1
- data/bin/keypair +1 -1
- data/bin/kms +1 -1
- data/bin/lambda +1 -1
- data/bin/lc +1 -1
- data/bin/param +1 -1
- data/bin/r53 +1 -1
- data/bin/rds +1 -1
- data/bin/route +1 -1
- data/bin/s3 +1 -1
- data/bin/sg +1 -1
- data/bin/sqs +1 -1
- data/bin/ssm +1 -1
- data/bin/sts +1 -1
- data/bin/subnet +1 -1
- data/bin/ta +1 -1
- data/bin/vpc +1 -1
- data/bin/waf +1 -1
- data/lib/awful.rb +1 -1
- data/lib/awful/cloudformation.rb +7 -2
- data/lib/awful/sts.rb +11 -4
- data/lib/awful/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80eab41f82cb2d3d90753811d0336912dea2027
|
4
|
+
data.tar.gz: 6cdcb78291ac310ebc2a0ba7f9ea50b13288ca6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcb1096da24fa34c27ca6c090919118c555f7d9a70fafcef35ea678202cf3767c25af8030604c4eae6c327d29ac555649b6f2af5662851667a5187b73ffd58e5
|
7
|
+
data.tar.gz: 8f97ce30eacfa8429a0814008b7f0cbeea615f1761538e9260c022a2958816ec7f0c14849268c5e120905a2fe2ff9bbd5d8450a2f85bd9c90e3a3d3a05170993
|
data/bin/acm
CHANGED
data/bin/alb
CHANGED
data/bin/ami
CHANGED
data/bin/apigw
CHANGED
data/bin/asg
CHANGED
data/bin/asgn
CHANGED
data/bin/certs
CHANGED
data/bin/cf
CHANGED
data/bin/cloudfront
CHANGED
data/bin/cwevents
CHANGED
data/bin/cwlogs
CHANGED
data/bin/dp
CHANGED
data/bin/dyn
CHANGED
data/bin/ec2
CHANGED
data/bin/ecr
CHANGED
data/bin/ecs
CHANGED
data/bin/eip
CHANGED
data/bin/elasticache
CHANGED
data/bin/elb
CHANGED
data/bin/iam
CHANGED
data/bin/keypair
CHANGED
data/bin/kms
CHANGED
data/bin/lambda
CHANGED
data/bin/lc
CHANGED
data/bin/param
CHANGED
data/bin/r53
CHANGED
data/bin/rds
CHANGED
data/bin/route
CHANGED
data/bin/s3
CHANGED
data/bin/sg
CHANGED
data/bin/sqs
CHANGED
data/bin/ssm
CHANGED
data/bin/sts
CHANGED
data/bin/subnet
CHANGED
data/bin/ta
CHANGED
data/bin/vpc
CHANGED
data/bin/waf
CHANGED
data/lib/awful.rb
CHANGED
@@ -104,7 +104,7 @@ module Awful
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
## returns contents of named file, or stdin if file = nil
|
107
|
+
## returns contents of named file, or stdin if file = nil, or false if no stdin
|
108
108
|
def file_or_stdin(file)
|
109
109
|
(file and File.read(file)) || ((not $stdin.tty?) and $stdin.read)
|
110
110
|
end
|
data/lib/awful/cloudformation.rb
CHANGED
@@ -183,9 +183,14 @@ module Awful
|
|
183
183
|
end
|
184
184
|
|
185
185
|
desc 'events NAME', 'show events for stack with name NAME'
|
186
|
+
method_option :number, aliases: '-n', type: :numeric, default: nil, desc: 'return n most recent events'
|
186
187
|
def events(name)
|
187
|
-
cf.describe_stack_events(stack_name: name).stack_events
|
188
|
-
|
188
|
+
events = cf.describe_stack_events(stack_name: name).stack_events
|
189
|
+
events = events.first(options[:number]) if options[:number]
|
190
|
+
events.reverse.output do |events|
|
191
|
+
print_table events.map { |e|
|
192
|
+
[e.timestamp, color(e.resource_status), e.resource_type, e.logical_resource_id, e.resource_status_reason]
|
193
|
+
}
|
189
194
|
end
|
190
195
|
end
|
191
196
|
|
data/lib/awful/sts.rb
CHANGED
@@ -13,13 +13,20 @@ module Awful
|
|
13
13
|
end
|
14
14
|
|
15
15
|
desc 'assume_role ARN NAME', 'Return credentials for given role'
|
16
|
-
method_option :duration_seconds, aliases: '-d', type: :numeric, default: nil,
|
17
|
-
method_option :policy, aliases: '-p', type: :string, default: nil,
|
16
|
+
method_option :duration_seconds, aliases: '-d', type: :numeric, default: nil, desc: 'Duration of session in sec'
|
17
|
+
method_option :policy, aliases: '-p', type: :string, default: nil, desc: 'Access policy as JSON string'
|
18
|
+
method_option :env, aliases: '-e', type: :boolean, default: false, desc: 'output as env vars to eval'
|
18
19
|
def assume_role(arn, name)
|
19
20
|
opts = only_keys_matching(symbolize_keys(options), %i[duration_seconds policy])
|
20
21
|
params = { role_arn: arn, role_session_name: name }.merge(opts)
|
21
|
-
sts.assume_role(params).
|
22
|
-
|
22
|
+
sts.assume_role(params).output do |session|
|
23
|
+
if options[:env]
|
24
|
+
puts %i[access_key_id secret_access_key session_token].map { |var|
|
25
|
+
"export AWS_#{var.upcase}=#{session.credentials.send(var)}"
|
26
|
+
}
|
27
|
+
else
|
28
|
+
puts YAML.dump(stringify_keys(session.to_hash))
|
29
|
+
end
|
23
30
|
end
|
24
31
|
end
|
25
32
|
end
|
data/lib/awful/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.175
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ric Lister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|