Class: Packer::Builder::Amazon
Defined Under Namespace
Classes: EBS, Instance
Constant Summary
AMAZON_EBS, AMAZON_INSTANCE, DOCKER, VALID_BUILDER_TYPES, VIRTUALBOX_ISO
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.
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/packer/builders/amazon.rb', line 21
def initialize
super
self.add_required(
'ami_name',
'instance_type',
'region',
'source_ami',
'ssh_username'
)
end
|
Instance Method Details
#access_key(key) ⇒ Object
32
33
34
|
# File 'lib/packer/builders/amazon.rb', line 32
def access_key(key)
self.__add_string('access_key', key)
end
|
#ami_block_device_mappings(mappings) ⇒ Object
60
61
62
|
# File 'lib/packer/builders/amazon.rb', line 60
def ami_block_device_mappings(mappings)
self.__add_array_of_hashes('ami_block_device_mappings', mappings)
end
|
#ami_description(description) ⇒ Object
64
65
66
|
# File 'lib/packer/builders/amazon.rb', line 64
def ami_description(description)
self.__add_string('ami_description', description)
end
|
#ami_groups(groups) ⇒ Object
68
69
70
|
# File 'lib/packer/builders/amazon.rb', line 68
def ami_groups(groups)
self.__add_array_of_strings('ami_groups', groups)
end
|
#ami_name(name) ⇒ Object
36
37
38
|
# File 'lib/packer/builders/amazon.rb', line 36
def ami_name(name)
self.__add_string('ami_name', name)
end
|
#ami_product_codes(codes) ⇒ Object
72
73
74
|
# File 'lib/packer/builders/amazon.rb', line 72
def ami_product_codes(codes)
self.__add_array_of_strings('ami_product_codes', codes)
end
|
#ami_regions(regions) ⇒ Object
76
77
78
|
# File 'lib/packer/builders/amazon.rb', line 76
def ami_regions(regions)
self.__add_array_of_strings('ami_regions', regions)
end
|
#ami_users(users) ⇒ Object
80
81
82
|
# File 'lib/packer/builders/amazon.rb', line 80
def ami_users(users)
self.__add_array_of_strings('ami_users', users)
end
|
#ami_virtualization_type(type) ⇒ Object
84
85
86
|
# File 'lib/packer/builders/amazon.rb', line 84
def ami_virtualization_type(type)
self.__add_string('ami_virtualization_type', type)
end
|
#associate_public_ip_address(bool) ⇒ Object
88
89
90
|
# File 'lib/packer/builders/amazon.rb', line 88
def associate_public_ip_address(bool)
self.__add_boolean('associate_public_ip_address', bool)
end
|
#availability_zone(zone) ⇒ Object
92
93
94
|
# File 'lib/packer/builders/amazon.rb', line 92
def availability_zone(zone)
self.__add_string('availability_zone', zone)
end
|
#enhanced_networking(bool) ⇒ Object
96
97
98
|
# File 'lib/packer/builders/amazon.rb', line 96
def enhanced_networking(bool)
self.__add_boolean('enhanced_networking', bool)
end
|
#iam_instance_profile(profile) ⇒ Object
100
101
102
|
# File 'lib/packer/builders/amazon.rb', line 100
def iam_instance_profile(profile)
self.__add_string('iam_instance_profile', profile)
end
|
#instance_type(type) ⇒ Object
40
41
42
|
# File 'lib/packer/builders/amazon.rb', line 40
def instance_type(type)
self.__add_string('instance_type', type)
end
|
#launch_block_device_mappings(mappings) ⇒ Object
104
105
106
|
# File 'lib/packer/builders/amazon.rb', line 104
def launch_block_device_mappings(mappings)
self.__add_array_of_hashes('launch_block_device_mappings', mappings)
end
|
#region(name) ⇒ Object
44
45
46
|
# File 'lib/packer/builders/amazon.rb', line 44
def region(name)
self.__add_string('region', name)
end
|
108
109
110
|
# File 'lib/packer/builders/amazon.rb', line 108
def run_tags(tags)
self.__add_hash('run_tags', tags)
end
|
#secret_key(key) ⇒ Object
56
57
58
|
# File 'lib/packer/builders/amazon.rb', line 56
def secret_key(key)
self.__add_string('secret_key', key)
end
|
#security_group_id(id) ⇒ Object
112
113
114
|
# File 'lib/packer/builders/amazon.rb', line 112
def security_group_id(id)
self.__add_string('security_group_id', id, %w[security_group_ids])
end
|
#security_group_ids(ids) ⇒ Object
116
117
118
|
# File 'lib/packer/builders/amazon.rb', line 116
def security_group_ids(ids)
self.__add_array_of_strings('security_group_ids', ids, %w[security_group_id])
end
|
#source_ami(name) ⇒ Object
48
49
50
|
# File 'lib/packer/builders/amazon.rb', line 48
def source_ami(name)
self.__add_string('source_ami', name)
end
|
#ssh_port(port) ⇒ Object
120
121
122
|
# File 'lib/packer/builders/amazon.rb', line 120
def ssh_port(port)
self.__add_integer('ssh_port', port)
end
|
#ssh_private_key_file(file) ⇒ Object
124
125
126
|
# File 'lib/packer/builders/amazon.rb', line 124
def ssh_private_key_file(file)
self.__add_string('ssh_private_key_file', file)
end
|
#ssh_timeout(time) ⇒ Object
128
129
130
|
# File 'lib/packer/builders/amazon.rb', line 128
def ssh_timeout(time)
self.__add_string('ssh_timeout', time)
end
|
#ssh_username(username) ⇒ Object
52
53
54
|
# File 'lib/packer/builders/amazon.rb', line 52
def ssh_username(username)
self.__add_string('ssh_username', username)
end
|
#subnet_id(id) ⇒ Object
132
133
134
|
# File 'lib/packer/builders/amazon.rb', line 132
def subnet_id(id)
self.__add_string('subnet_id', id)
end
|
136
137
138
|
# File 'lib/packer/builders/amazon.rb', line 136
def tags(tags)
self.__add_hash('tags', tags)
end
|
#temporary_key_pair_name(name) ⇒ Object
140
141
142
|
# File 'lib/packer/builders/amazon.rb', line 140
def temporary_key_pair_name(name)
self.__add_string('temporary_key_pair_name', name)
end
|
#user_data(data) ⇒ Object
144
145
146
|
# File 'lib/packer/builders/amazon.rb', line 144
def user_data(data)
self.__add_string('user_data', data)
end
|
#user_data_file(file) ⇒ Object
148
149
150
|
# File 'lib/packer/builders/amazon.rb', line 148
def user_data_file(file)
self.__add_string('user_data_file', file)
end
|
#vpc_id(id) ⇒ Object
152
153
154
|
# File 'lib/packer/builders/amazon.rb', line 152
def vpc_id(id)
self.__add_string('vpc_id', id)
end
|