Class: TerraformDSL::AWS::IAM::Role

Inherits:
Resource
  • Object
show all
Defined in:
lib/terraformdsl/aws.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#parent

Instance Method Summary collapse

Methods inherited from Resource

#accept, #set_parent

Constructor Details

#initialize(name, path, policy) ⇒ Role

Returns a new instance of Role.



564
565
566
567
568
# File 'lib/terraformdsl/aws.rb', line 564

def initialize(name, path, policy)
  @name     = name
  @path     = path
  @policy   = policy
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



569
570
571
# File 'lib/terraformdsl/aws.rb', line 569

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



569
570
571
# File 'lib/terraformdsl/aws.rb', line 569

def path
  @path
end

#policyObject (readonly)

Returns the value of attribute policy.



569
570
571
# File 'lib/terraformdsl/aws.rb', line 569

def policy
  @policy
end

Instance Method Details

#attr(attr) ⇒ Object



571
# File 'lib/terraformdsl/aws.rb', line 571

def attr(attr); "${aws_iam_role.#{@name}.#{attr}}"; end