Sha256: b0546741e6b12c8665c60849964264f3bcc5b799ae81be0803e3f31606deb280

Contents?: true

Size: 652 Bytes

Versions: 12

Compression:

Stored size: 652 Bytes

Contents

module Ufo::IamRole
  class DSL
    include DslEvaluator
    include Ufo::TaskDefinition::Helpers::AwsHelper

    def initialize(path)
      @path = path # IE: .ufo/iam_roles/task_role.rb
    end

    def evaluate
      evaluate_file(@path)
    end

    def iam_policy(policy_name, statements)
      role_type = File.basename(@path).sub('.rb','') # task_role or execution_role
      Registry.register_policy(role_type, policy_name, statements)
    end

    def managed_iam_policy(*policies)
      role_type = File.basename(@path).sub('.rb','') # task_role or execution_role
      Registry.register_managed_policy(role_type, policies)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ufo-6.2.5 lib/ufo/iam_role/dsl.rb
ufo-6.2.4 lib/ufo/iam_role/dsl.rb
ufo-6.2.3 lib/ufo/iam_role/dsl.rb
ufo-6.2.2 lib/ufo/iam_role/dsl.rb
ufo-6.2.1 lib/ufo/iam_role/dsl.rb
ufo-6.2.0 lib/ufo/iam_role/dsl.rb
ufo-6.1.5 lib/ufo/iam_role/dsl.rb
ufo-6.1.4 lib/ufo/iam_role/dsl.rb
ufo-6.1.3 lib/ufo/iam_role/dsl.rb
ufo-6.1.2 lib/ufo/iam_role/dsl.rb
ufo-6.1.1 lib/ufo/iam_role/dsl.rb
ufo-6.1.0 lib/ufo/iam_role/dsl.rb