title: Is there any way to delay a resource's attribute resolution until the "execute" phase?
body: <p>I have two LWRPs. The first deals with creating a disk volume, formatting it, and mounting it on a virtual machine, we'll call this resource <code>cloud_volume</code>. The second resource (not really important what it does) needs a UUID for the newly formatted volume which is a required attribute, we'll call this resource <code>foobar</code>.</p>
  
  <p>The resources <code>cloud_volume</code> and <code>foobar</code> are used in a recipe something like the following.</p>
  
  <pre><code>volumes.each do |mount_point, volume|
    cloud_volume "#{mount_point}" do
      size volume['size']
      label volume['label']
      action [:create, :initialize]
    end
    foobar "#{mount_point}" do
      disk_uuid node[:volumes][mount_point][:uuid]   # This is set by cloud_volume
      action [:do_stuff]
    end
  end
  </code></pre>
  
  <p>So, when I do a chef run I get a <code>Required argument disk_identifier is missing!</code> exception.</p>
  
  <p>After doing some digging I discovered that recipes are processed in two phases, a compile phase and an execute phase. It looks like the issue is at compile time as that is the point in time that <code>node[:volumes][mount_point][:uuid]</code> is not set. </p>
  
  <p>Unfortunately I can't use the trick that OpsCode has <a href="http://web.archive.org/web/20120226074250/http://wiki.opscode.com/display/chef/Evaluate+and+Run+Resources+at+Compile+Time" rel="nofollow noreferrer">here</a> as notifications are being used in the cloud_volume LWRP (so it would fall into the anti-pattern shown in the documentation)</p>
  
  <p>So, after all this, my question is, is there any way to get around the requirement that the value of <code>disk_uuid</code> be known at compile time? </p>