Class: Convection::Model::Template::Resource::EC2Instance
Overview
Instance Attribute Summary
#exist, #name, #parent, #properties, #resource_attributes, #template
Instance Method Summary
collapse
#immutable_metadata, #render_tags, #tag, #tags
#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, #property, property, #reference, type, #type, #with_output
#condition, #render_condition
attach_resource
#camel_case, included, method_name, #screaming_snake_case, #snake_case
#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select
Instance Method Details
#availability_zone ⇒ Object
#availability_zone(value) ⇒ Object
14
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 14
property :availability_zone, 'AvailabilityZone'
|
#block_device(&block) ⇒ Object
Append a block device mapping
37
38
39
40
41
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 37
def block_device(&block)
block_device = ResourceProperty::EC2BlockDeviceMapping.new(self)
block_device.instance_exec(&block) if block
block_devices << block_device
end
|
#block_devices ⇒ Object
#block_devices(value) ⇒ Object
25
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 25
property :block_devices, 'BlockDeviceMappings', :type => :list
|
#disable_api_termination ⇒ Object
#disable_api_termination(value) ⇒ Object
23
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 23
property :disable_api_termination, 'DisableApiTermination'
|
#image_id ⇒ Object
#image_id(value) ⇒ Object
15
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 15
property :image_id, 'ImageId'
|
#instance_profile ⇒ Object
#instance_profile(value) ⇒ Object
17
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 17
property :instance_profile, 'IamInstanceProfile'
|
#instance_type ⇒ Object
#instance_type(value) ⇒ Object
16
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 16
property :instance_type, 'InstanceType'
|
#key_name ⇒ Object
#key_name(value) ⇒ Object
18
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 18
property :key_name, 'KeyName'
|
#network_interface(&block) ⇒ Object
Append a network interface to network_interfaces
29
30
31
32
33
34
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 29
def network_interface(&block)
interface = ResourceProperty::EC2NetworkInterface.new(self)
interface.instance_exec(&block) if block
interface.device_index = network_interfaces.count.to_s
network_interfaces << interface
end
|
#network_interfaces ⇒ Object
#network_interfaces(value) ⇒ Object
24
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 24
property :network_interfaces, 'NetworkInterfaces', :type => :list
|
#render(*args) ⇒ Object
50
51
52
53
54
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 50
def render(*args)
super.tap do |resource|
render_tags(resource)
end
end
|
#security_group ⇒ Object
#security_group(value) ⇒ Object
21
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 21
property :security_group, 'SecurityGroupIds', :type => :list
|
#src_dst_checks ⇒ Object
#src_dst_checks(value) ⇒ Object
22
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 22
property :src_dst_checks, 'SourceDestCheck'
|
#subnet ⇒ Object
#subnet(value) ⇒ Object
19
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 19
property :subnet, 'SubnetId'
|
#user_data ⇒ Object
#user_data(value) ⇒ Object
20
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 20
property :user_data, 'UserData'
|
#volume(&block) ⇒ Object
Append a volume to volumes
44
45
46
47
48
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 44
def volume(&block)
volume = ResourceProperty::EC2MountPoint.new(self)
volume.instance_exec(&block) if block
volumes << volume
end
|
#volumes ⇒ Object
#volumes(value) ⇒ Object
26
|
# File 'lib/convection/model/template/resource/aws_ec2_instance.rb', line 26
property :volumes, 'Volumes', :type => :list
|