Class: TerraformDSL::AWS::Infra

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

Instance Attribute Summary

Attributes inherited from Resource

#parent

Instance Method Summary collapse

Methods inherited from Resource

#accept, #attr, #set_parent

Instance Method Details

#generate_tfObject



66
67
68
69
70
71
72
73
74
75
76
# File 'lib/terraformdsl/aws.rb', line 66

def generate_tf
  visitor = TerraformVisitor.new
  visitor.visit(self)
  tf_str = visitor.output()
  #
  if $_rds_monitoring_role_required
    tf_str << RDS::RDS_MONITORING_ROLE_TF
  end
  #
  return tf_str
end

#global(*a, &b) ⇒ Object



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

def global(*a, &b); add_resource(Global.new(*a), &b); end

#region(*a, &b) ⇒ Object



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

def region(*a, &b); add_resource(Region.new(*a), &b); end