Sha256: 315bb1cafedaf897ba16c6944ca2c8867b09ce79cc80c20ff071d6740521d8a3
Contents?: true
Size: 561 Bytes
Versions: 230
Compression:
Stored size: 561 Bytes
Contents
module Jets::Resource::Iam class ManagedPolicy extend Memoist attr_reader :definitions def initialize(*definitions) @definitions = definitions.flatten.compact end def arns definitions.map { |definition| standardize(definition) } end memoize :arns # only process arns once # AmazonEC2ReadOnlyAccess => arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess def standardize(definition) return definition if definition.include?('iam::aws:policy') "arn:aws:iam::aws:policy/#{definition}" end end end
Version data entries
230 entries across 230 versions & 4 rubygems