title: cloud-init: delay disk_setup and fs_setup
body: <p>I have a cloud-init file that sets up all requirements for our AWS instances, and part of those requirements is formating and mounting an EBS volume. The issue is that on some instances volume attachment occurs after the instance is up, so when cloud-init executes the volume <code>/dev/xvdf</code> does not yet exist and it fails.</p>
  <p>I have something like:</p>
  <pre><code>#cloud-config
  
  resize_rootfs: false
  disk_setup:
      /dev/xvdf:
          table_type: 'gpt'
          layout: true
          overwrite: false
  
  fs_setup:
      - label: DATA
        filesystem: 'ext4'
        device: '/dev/xvdf'
        partition: 'auto'
  
  mounts:
      - [xvdf, /data, auto, &quot;defaults,discard&quot;, &quot;0&quot;, &quot;0&quot;]
  </code></pre>
  <p>And would like to have something like a <code>sleep 60</code> or something like that before the disk configuration block.</p>
  <p>If the whole cloud-init execution can be delayed, that would also work for me.</p>
  <p>Also, I'm using terraform to create the infrastructure.</p>
  <p>Thanks!</p>