Skip to content

Commit

Permalink
base64 encode user_data in aws_launch_configuration as well - was onl…
Browse files Browse the repository at this point in the history
…y doing it in bootstrap_options

Signed-off-by: Jaymz Julian <[email protected]>
  • Loading branch information
jjlimepoint committed Feb 12, 2018
1 parent b77dcb3 commit 0caa7cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/chef/provider/aws_launch_configuration.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'chef/provisioning/aws_driver/aws_provider'
require 'chef/resource/aws_image'
require 'base64'

class Chef::Provider::AwsLaunchConfiguration < Chef::Provisioning::AWSDriver::AWSProvider
provides :aws_launch_configuration
Expand All @@ -13,6 +14,7 @@ def create_aws_object
options[:launch_configuration_name] = new_resource.name if new_resource.name
options[:image_id] = image_id
options[:instance_type] = instance_type
options[:user_data] = Base64.encode64(options[:user_data]) unless options[:user_data].nil?

converge_by "create launch configuration #{new_resource.name} in #{region}" do
new_resource.driver.auto_scaling_client.create_launch_configuration(options)
Expand Down

0 comments on commit 0caa7cf

Please sign in to comment.