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

aws_ebs_volume ideopotency ? #525

Open dushyant28 opened 7 years ago

dushyant28 commented 7 years ago

Hi,

I am trying to attach an EBS with an instance (provisioned by machine resource). But when i run the provisioning cookbook again... it again creates a new volume and tries to attach to the same device on the instance (which is not possible because the device is already being used the previously created volume)

it updates the data bag

Dushyants-MacBook-Pro:amd_infra rle0202$ knife data bag show aws_ebs_volume test_db_vol WARNING: Unencrypted data bag detected, ignoring any provided secret options. driver_url: aws id: test_db_vol reference: id: vol-06917b09f6a07f0ac Dushyants-MacBook-Pro:amd_infra rle0202$ knife data bag show aws_ebs_volume test_db_vol WARNING: Unencrypted data bag detected, ignoring any provided secret options. driver_url: aws id: test_db_vol reference: id: vol-046554bce78f47c53

and it say in the logs:

aws_ebs_volume[test_db_vol] (vol-06917b09f6a07f0ac) action create[2017-02-08T07:07:21+00:00] WARN: aws_ebs_volume[test_db_vol] (vol-06917b09f6a07f0ac) is currently associated with vol-06917b09f6a07f0ac in aws, but it does not exist! We will create a new one to replace it.

If I check it manually on the AWS console ..... it exists !

Kindly help