Sha256: 773fbf971ee40a0fdf7a0d863f235d32ce0884426b7f9488d65ec6402602d815

Contents?: true

Size: 639 Bytes

Versions: 10

Compression:

Stored size: 639 Bytes

Contents

module Ufo::IamRole
  class DSL
    include DslEvaluator

    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

    def aws
      AwsData.new
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ufo-6.0.9 lib/ufo/iam_role/dsl.rb
ufo-6.0.8 lib/ufo/iam_role/dsl.rb
ufo-6.0.7 lib/ufo/iam_role/dsl.rb
ufo-6.0.6 lib/ufo/iam_role/dsl.rb
ufo-6.0.5 lib/ufo/iam_role/dsl.rb
ufo-6.0.4 lib/ufo/iam_role/dsl.rb
ufo-6.0.3 lib/ufo/iam_role/dsl.rb
ufo-6.0.2 lib/ufo/iam_role/dsl.rb
ufo-6.0.1 lib/ufo/iam_role/dsl.rb
ufo-6.0.0 lib/ufo/iam_role/dsl.rb