lib/miam/exporter.rb in miam-0.2.4.beta9 vs lib/miam/exporter.rb in miam-0.2.4.beta10
- old
+ new
@@ -1,8 +1,9 @@
# coding: utf-8
class Miam::Exporter
AWS_MANAGED_POLICY_PREFIX = 'arn:aws:iam::aws:'
+ AWS_CN_MANAGED_POLICY_PREFIX = 'arn:aws-cn:iam::aws:'
def self.export(iam, options = {})
self.new(iam, options).export
end
@@ -198,10 +199,10 @@
def export_policies(policies)
result = {}
Parallel.each(policies, :in_threads => @concurrency) do |policy|
- if policy.arn.start_with?(AWS_MANAGED_POLICY_PREFIX)
+ if policy.arn.start_with?(AWS_MANAGED_POLICY_PREFIX) or policy.arn.start_with?(AWS_CN_MANAGED_POLICY_PREFIX)
next
end
policy_name = policy.policy_name
document = export_policy_document(policy)