Skip to content

Commit

Permalink
Allow VPC instance to associate withi non-EIP public IP on launch.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjt committed May 27, 2014
1 parent 500c712 commit 7791a13
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions lib/aerosol/launch_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ class Aerosol::LaunchConfiguration
include Dockly::Util::Logger::Mixin

logger_prefix '[aerosol launch_configuration]'
aws_attribute :aws_identifier => 'LaunchConfigurationName',
:ami => 'ImageId',
:instance_type => 'InstanceType',
:security_groups => 'SecurityGroups',
:user_data => 'UserData',
:iam_role => 'IamInstanceProfile',
:kernel_id => 'KernelId',
:key_name => 'KeyName',
:spot_price => 'SpotPrice',
:created_time => 'CreatedTime'
aws_attribute :aws_identifier => 'LaunchConfigurationName',
:ami => 'ImageId',
:instance_type => 'InstanceType',
:security_groups => 'SecurityGroups',
:user_data => 'UserData',
:iam_role => 'IamInstanceProfile',
:kernel_id => 'KernelId',
:key_name => 'KeyName',
:spot_price => 'SpotPrice',
:created_time => 'CreatedTime',
:associate_public_ip_address => 'AssociatePublicIpAddress'

primary_key :aws_identifier
default_value(:security_groups) { [] }
Expand Down Expand Up @@ -81,7 +82,8 @@ def create_options
'KeyName' => key_name,
'SecurityGroups' => security_groups,
'SpotPrice' => spot_price,
'UserData' => Aerosol::Util.strip_heredoc(user_data || '')
'UserData' => Aerosol::Util.strip_heredoc(user_data || ''),
'AssociatePublicIpAddress' => associate_public_ip_address
}.reject { |k, v| v.nil? }
end

Expand Down

0 comments on commit 7791a13

Please sign in to comment.