miam 0.2.4.beta2 → 0.2.4.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miam/driver.rb +6 -1
- data/lib/miam/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: cdcd3a3de50a6ede639ee4df2f05aabea0413983
|
4
|
+
data.tar.gz: caeea997fa66b63a4b1ca0a174b5835c79d49f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f931e1136b9ba6c6d524118d958be3d49437d19aab6743faed50ed7f986a847a8907d6f8d846a78339e3cd12446951845f7d5b9556cb0a8227d7d6a411cca6b0
|
7
|
+
data.tar.gz: eabb63a8dfb22cb32c207d9b13de53d2700f69fa1dfd9f5d4e849767ae61beb125d96fdf373e9fb6b9fb5a1034aba1c4966259a2506c6c40aa0b8cdde0161f17
|
data/lib/miam/driver.rb
CHANGED
@@ -455,7 +455,12 @@ class Miam::Driver
|
|
455
455
|
yield unless @options[:dry_run]
|
456
456
|
end
|
457
457
|
|
458
|
+
def account_id
|
459
|
+
# https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
460
|
+
@account_id ||= @iam.get_user.user.arn.split(':').fetch(4)
|
461
|
+
end
|
462
|
+
|
458
463
|
def policy_arn(policy_name)
|
459
|
-
"arn:aws:iam::#{
|
464
|
+
"arn:aws:iam::#{account_id}:policy/#{policy_name}"
|
460
465
|
end
|
461
466
|
end
|
data/lib/miam/version.rb
CHANGED