title: Separate heat template for volumes and instances
body: <p>We want to create a heat templates with servers and volumes attached to these servers. But we also want to be able to destroy all quickly servers without destroying volumes.</p>
  
  <p>So we decided it would be best to make 2 heat templates instead of one :
  - one for volumes
  - one for servers and volume attachements</p>
  
  <p>We would like something like that :</p>
  
  <p><strong>stack-for-volume.yml</strong></p>
  
  <pre><code>description: project
  
  heat_template_version: '2015-10-15'
  
  resources:
  
          volume-choca-01:
                  type: OS::Cinder::Volume
                  properties:
                          name: volume-choca-01
                          size: 15
  </code></pre>
  
  <p><strong>stack-for-servers-and-attachments.yml</strong></p>
  
  <pre><code>description: project
  
  heat_template_version: '2015-10-15'
  
  resources:
  
          vm-choca-01:
                  type: OS::Nova::Server
                  properties:
                          flavor: CO.2
                          image: Centos 7
                          key_name: choca
                          name: vm-choca-01
                          networks:
                          - {network: net-ext}
                          security_groups: [default]
  
          volume-attachment-01:
                  type: OS::Cinder::VolumeAttachment
                  properties:
                          instance_uuid: { get_resource: vm-choca-01 }
                          volume_id: { get_resource: volume-choca-01 }
  </code></pre>
  
  <p>Of course since all resources are not in the same file:
  <code>volume_id: { get_resource: volume-choca-01 }</code> can't work.</p>
  
  <p>We tried to get the volume_id with the solution posted here : <a href="https://stackoverflow.com/questions/37089728/openstack-heat-separate-templates">Openstack Heat - separate templates</a>
  by adding at the end stack-for-volume.yml :</p>
  
  <pre><code>outputs:
          volume-choca-01-id:
                  description: something
                  value: { get_attr: [volume-choca-01] }
  </code></pre>
  
  <p>But the output didn't give us anything looking like the volume id.
  We´re stuck right now.</p>
  
  <p>Any idea ?</p>