Class: Packer::Builder::Amazon
Defined Under Namespace
Classes: EBS, Instance
Constant Summary
AMAZON_EBS, AMAZON_INSTANCE, DOCKER, NULL, VALID_BUILDER_TYPES, VIRTUALBOX_ISO, VMWARE_ISO, VMWARE_VMX
Instance Attribute Summary
Attributes inherited from DataObject
#data, #required
Instance Method Summary
collapse
get_builder, #name, types
Methods inherited from DataObject
#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_string, #__exclusive_key_error, #add_required, #deep_copy, #validate
Constructor Details
#initialize ⇒ Amazon
Returns a new instance of Amazon.
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/packer/builders/amazon.rb', line 8
def initialize
super
self.add_required(
'ami_name',
'instance_type',
'region',
'source_ami',
'ssh_username'
)
end
|
Instance Method Details
#access_key(key) ⇒ Object
19
20
21
|
# File 'lib/packer/builders/amazon.rb', line 19
def access_key(key)
self.__add_string('access_key', key)
end
|
#ami_block_device_mappings(mappings) ⇒ Object
47
48
49
|
# File 'lib/packer/builders/amazon.rb', line 47
def ami_block_device_mappings(mappings)
self.__add_array_of_hashes('ami_block_device_mappings', mappings)
end
|
#ami_description(description) ⇒ Object
51
52
53
|
# File 'lib/packer/builders/amazon.rb', line 51
def ami_description(description)
self.__add_string('ami_description', description)
end
|
#ami_groups(groups) ⇒ Object
55
56
57
|
# File 'lib/packer/builders/amazon.rb', line 55
def ami_groups(groups)
self.__add_array_of_strings('ami_groups', groups)
end
|
#ami_name(name) ⇒ Object
23
24
25
|
# File 'lib/packer/builders/amazon.rb', line 23
def ami_name(name)
self.__add_string('ami_name', name)
end
|
#ami_product_codes(codes) ⇒ Object
59
60
61
|
# File 'lib/packer/builders/amazon.rb', line 59
def ami_product_codes(codes)
self.__add_array_of_strings('ami_product_codes', codes)
end
|
#ami_regions(regions) ⇒ Object
63
64
65
|
# File 'lib/packer/builders/amazon.rb', line 63
def ami_regions(regions)
self.__add_array_of_strings('ami_regions', regions)
end
|
#ami_users(users) ⇒ Object
67
68
69
|
# File 'lib/packer/builders/amazon.rb', line 67
def ami_users(users)
self.__add_array_of_strings('ami_users', users)
end
|
#ami_virtualization_type(type) ⇒ Object
71
72
73
|
# File 'lib/packer/builders/amazon.rb', line 71
def ami_virtualization_type(type)
self.__add_string('ami_virtualization_type', type)
end
|
#associate_public_ip_address(bool) ⇒ Object
75
76
77
|
# File 'lib/packer/builders/amazon.rb', line 75
def associate_public_ip_address(bool)
self.__add_boolean('associate_public_ip_address', bool)
end
|
#availability_zone(zone) ⇒ Object
79
80
81
|
# File 'lib/packer/builders/amazon.rb', line 79
def availability_zone(zone)
self.__add_string('availability_zone', zone)
end
|
#enhanced_networking(bool) ⇒ Object
83
84
85
|
# File 'lib/packer/builders/amazon.rb', line 83
def enhanced_networking(bool)
self.__add_boolean('enhanced_networking', bool)
end
|
#iam_instance_profile(profile) ⇒ Object
87
88
89
|
# File 'lib/packer/builders/amazon.rb', line 87
def iam_instance_profile(profile)
self.__add_string('iam_instance_profile', profile)
end
|
#instance_type(type) ⇒ Object
27
28
29
|
# File 'lib/packer/builders/amazon.rb', line 27
def instance_type(type)
self.__add_string('instance_type', type)
end
|
#launch_block_device_mappings(mappings) ⇒ Object
91
92
93
|
# File 'lib/packer/builders/amazon.rb', line 91
def launch_block_device_mappings(mappings)
self.__add_array_of_hashes('launch_block_device_mappings', mappings)
end
|
#region(name) ⇒ Object
31
32
33
|
# File 'lib/packer/builders/amazon.rb', line 31
def region(name)
self.__add_string('region', name)
end
|
95
96
97
|
# File 'lib/packer/builders/amazon.rb', line 95
def run_tags(tags)
self.__add_hash('run_tags', tags)
end
|
#secret_key(key) ⇒ Object
43
44
45
|
# File 'lib/packer/builders/amazon.rb', line 43
def secret_key(key)
self.__add_string('secret_key', key)
end
|
#security_group_id(id) ⇒ Object
99
100
101
|
# File 'lib/packer/builders/amazon.rb', line 99
def security_group_id(id)
self.__add_string('security_group_id', id, %w[security_group_ids])
end
|
#security_group_ids(ids) ⇒ Object
103
104
105
|
# File 'lib/packer/builders/amazon.rb', line 103
def security_group_ids(ids)
self.__add_array_of_strings('security_group_ids', ids, %w[security_group_id])
end
|
#source_ami(name) ⇒ Object
35
36
37
|
# File 'lib/packer/builders/amazon.rb', line 35
def source_ami(name)
self.__add_string('source_ami', name)
end
|
#ssh_port(port) ⇒ Object
107
108
109
|
# File 'lib/packer/builders/amazon.rb', line 107
def ssh_port(port)
self.__add_integer('ssh_port', port)
end
|
#ssh_private_key_file(file) ⇒ Object
111
112
113
|
# File 'lib/packer/builders/amazon.rb', line 111
def ssh_private_key_file(file)
self.__add_string('ssh_private_key_file', file)
end
|
#ssh_timeout(time) ⇒ Object
115
116
117
|
# File 'lib/packer/builders/amazon.rb', line 115
def ssh_timeout(time)
self.__add_string('ssh_timeout', time)
end
|
#ssh_username(username) ⇒ Object
39
40
41
|
# File 'lib/packer/builders/amazon.rb', line 39
def ssh_username(username)
self.__add_string('ssh_username', username)
end
|
#subnet_id(id) ⇒ Object
119
120
121
|
# File 'lib/packer/builders/amazon.rb', line 119
def subnet_id(id)
self.__add_string('subnet_id', id)
end
|
123
124
125
|
# File 'lib/packer/builders/amazon.rb', line 123
def tags(tags)
self.__add_hash('tags', tags)
end
|
#temporary_key_pair_name(name) ⇒ Object
127
128
129
|
# File 'lib/packer/builders/amazon.rb', line 127
def temporary_key_pair_name(name)
self.__add_string('temporary_key_pair_name', name)
end
|
#user_data(data) ⇒ Object
131
132
133
|
# File 'lib/packer/builders/amazon.rb', line 131
def user_data(data)
self.__add_string('user_data', data)
end
|
#user_data_file(file) ⇒ Object
135
136
137
|
# File 'lib/packer/builders/amazon.rb', line 135
def user_data_file(file)
self.__add_string('user_data_file', file)
end
|
#vpc_id(id) ⇒ Object
139
140
141
|
# File 'lib/packer/builders/amazon.rb', line 139
def vpc_id(id)
self.__add_string('vpc_id', id)
end
|