chef-boneyard / chef-provisioning-aws

AWS driver and resources for Chef that uses the AWS SDK
Apache License 2.0
142 stars 122 forks source link

Fix case where machine_options is not specified #561

Closed jjlimepoint closed 6 years ago

jjlimepoint commented 6 years ago

The following recipe should work, but does fails with a nil access exception:

require 'chef/provisioning' require 'chef/provisioning/aws_driver'

with_driver 'aws::us-east-1'

aws_launch_configuration 'TestConfig' do image 'ami-97785bed' instance_type 't2.micro' end

machine 'TestLinuxReady' do action :ready end

It does work if you specify machine options with an empty bootstrap_options hash. This fixes that by giving bootstrap_options a sensible default of nothing.