puppetlabs-aws
puppetlabs-aws copied to clipboard
Error provisioning new ec2_instance (instanceInitiatedShutdownBehavior)
I'm getting the following error:
Error: Could not set 'present' on ensure: The attribute instanceInitiatedShutdownBehavior can only be used for elastic images. at 20:/etc/puppetlabs/puppet/environments/production/modules/infra/manifests/perf.pp
This is my puppet code :: ec2_instance { "perf-www1" : ensure => present, image_id => 'ami-b040bad8', key_name => 'Corporate', security_groups => ['perf'], subnet => 'performance-test', instance_type => 'c3.2xlarge', tags => { type => 'perf-app-server', }, user_data => template("${module_name}/app_template.erb"), }
Is this an issue with puppet, or the aws-sdk? I'm using aws-sdk-core 2.0.48
A workaround is to add instance_initiated_shutdown_behavior => 'terminate' This works, but it would seem that this would be a required parameter, not an optional one.
@daveseff mmm, interesting. I can't find reference to elastic images anywhere. This could be related to the instance type or to the specific image. Could I ask what the image is?
This AMI happens to be a generic ubuntu 14.04 image from amazon. I suspect this error is coming from the aws ruby sdk and not this puppet module. I'm just saying that I was not able to provision the instance until I added instance_initiated_shutdown_behavior