Skip to content

Instantly share code, notes, and snippets.

#Problem: top recipe dynmically computes a value (volume_id) which is put in node[node[:aws][:ebs_volume][volume_handle][:volume_id]) and this value is needed in a subseuqent recipe at runtime, not compiletime
##
#calling recipe
aws_ebs_volume "volume_handle" do
aws_access_key aws['aws_access_key_id']
aws_secret_access_key aws['aws_secret_access_key']
availability_zone node[:ec2][:placement_availability_zone]
size ebs_vol_size
device ebs_vol_dev
snapshots_to_keep snapshots_to_keep
resource def file (in recipe test for time being)
#based on deploy resource; didnt use lwrp because had to pass in a block
def initialize(name, collection=nil, node=nil)
super(name, collection, node)
@resource_name = :test_nested
@action = "create"
@allowed_actions.push(:create)
end