chef-boneyard / chef-provisioning-aws

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

aws_ebs_volume from snapshot_id ? #526

Open dushyant28 opened 7 years ago

dushyant28 commented 7 years ago

Hi,

I am not able to create a volume from an existing snapshot using aws_ebs_volume

aws_ebs_volume "#{node['amd_infra']['stack_name']}_db_vol" do snapshot_id 'snap-fbd219dc' aws_tags 'attached_to' => "#{node['amd_infra']['stack_name']}_db", 'backup' => 'true', 'stack' => node['amd_infra']['stack_name'] availability_zone node['amd_infra']['db']['ebs']['additional_vol']['availability_zone'] size node['amd_infra']['db']['ebs']['additional_vol']['size'] volume_type node['amd_infra']['db']['ebs']['additional_vol']['type'] iops node['amd_infra']['db']['ebs']['additional_vol']['iops'] encrypted node['amd_infra']['db']['ebs']['additional_vol']['encrypted'] machine "#{node['amd_infra']['stack_name']}_db" device '/dev/xvdf' end

ERROR: undefined method `snapshot_id' for Chef::Resource::AwsEbsVolume

But I can see 'snapshot_id' in https://github.com/chef/chef-provisioning-aws/blob/master/lib/chef/provider/aws_ebs_volume.rb#L111

Gem version: chef-provisioning-aws (2.1.0)

Any help is appreciated !