From 45962b47364e987bf90bd838d8c7d1dd1537fab2 Mon Sep 17 00:00:00 2001 From: Randy Etheredge Date: Wed, 2 Mar 2016 14:30:55 -0500 Subject: [PATCH] Allow launch configuration customizations. --- README.md | 3 +++ lib/elbas/launch_configuration.rb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 68b7f11..5befac6 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ set :aws_region, ENV['AWS_REGION'] set :aws_no_reboot_on_create_ami, true set :aws_autoscale_instance_size, 'm1.small' + +set :aws_launch_configuration_detailed_instance_monitoring, true +set :aws_launch_configuration_associate_public_ip, true ``` ## Usage diff --git a/lib/elbas/launch_configuration.rb b/lib/elbas/launch_configuration.rb index 5fa9eb7..fb560f4 100644 --- a/lib/elbas/launch_configuration.rb +++ b/lib/elbas/launch_configuration.rb @@ -41,8 +41,8 @@ def instance_size def create_options _options = { security_groups: base_ec2_instance.security_groups.to_a, - detailed_instance_monitoring: true, - associate_public_ip_address: true, + detailed_instance_monitoring: fetch(:aws_launch_configuration_detailed_instance_monitoring, true), + associate_public_ip_address: fetch(:aws_launch_configuration_associate_public_ip, true), } if user_data = fetch(:aws_launch_configuration_user_data, nil)