Class: Jets::Resource::Iam::ApplicationRole

Inherits:
Base
  • Object
show all
Includes:
BaseRoleDefinition
Defined in:
lib/jets/resource/iam/application_role.rb

Instance Attribute Summary

Attributes included from BaseRoleDefinition

#managed_policy_definitions, #policy_definitions

Instance Method Summary collapse

Methods included from BaseRoleDefinition

#definition, #managed_policy_arns, #policy_document, #vpc_policy_document

Methods inherited from Base

#replacements, #resource

Constructor Details

#initializeApplicationRole

Returns a new instance of ApplicationRole.



5
6
7
8
9
10
11
# File 'lib/jets/resource/iam/application_role.rb', line 5

def initialize
  @policy_definitions = Jets.config.iam_policy # config.iam_policy contains definitions
  @policy_definitions = @policy_definitions ? [@policy_definitions].flatten : []

  @managed_policy_definitions = Jets.config.managed_iam_policy # config.managed_iam_policy contains definitions
  @managed_policy_definitions = @managed_policy_definitions ? [@managed_policy_definitions].flatten : []
end

Instance Method Details

#outputsObject



21
22
23
24
25
# File 'lib/jets/resource/iam/application_role.rb', line 21

def outputs
  {
    logical_id => "!Ref #{logical_id}",
  }
end

#policy_nameObject



17
18
19
# File 'lib/jets/resource/iam/application_role.rb', line 17

def policy_name
  "#{Jets.config.project_namespace}-application-policy"
end

#role_logical_idObject



13
14
15
# File 'lib/jets/resource/iam/application_role.rb', line 13

def role_logical_id
  "iam_role"
end