class TerraformDSL::AWS::EC2
Attributes
ami[R]
key_name[R]
name[R]
security_group[R]
subnet[R]
type[R]
Public Class Methods
new(name, type, ami, subnet, security_group, key_name)
click to toggle source
# File lib/terraformdsl/aws.rb, line 262 def initialize(name, type, ami, subnet, security_group, key_name) @name = name @type = type @ami = ami @subnet = subnet @security_group = security_group @key_name = key_name end
Public Instance Methods
attr(attr)
click to toggle source
# File lib/terraformdsl/aws.rb, line 279 def attr(attr); "${aws_instance.#{@name}.#{attr}}"; end
cpu_credit()
click to toggle source
# File lib/terraformdsl/aws.rb, line 272 def cpu_credit case @type when /^t[2-9]\./ ; "unlimited" else ; nil end end