Method: AmiSpec::AwsInstance#initialize

Defined in:
lib/ami_spec/aws_instance.rb

#initialize(options) ⇒ AwsInstance

Returns a new instance of AwsInstance.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ami_spec/aws_instance.rb', line 15

def initialize(options)
  @role = options.fetch(:role)
  @ami = options.fetch(:ami)
  @subnet_id = options.fetch(:subnet_id)
  @key_name = options.fetch(:key_name)
  @instance_type = options.fetch(:aws_instance_type)
  @public_ip = options.fetch(:aws_public_ip)
  @region = options.fetch(:aws_region)
  @security_group_ids = options.fetch(:aws_security_groups)
  @tags = ec2ify_tags(options.fetch(:tags))
  @user_data_file = options.fetch(:user_data_file, nil)
  @iam_instance_profile_arn = options.fetch(:iam_instance_profile_arn, nil)
end