c5e1c001bb
Adds an example in response to a ML question, shows how you can create a resource group containing a number of nested stacks containing identical volumes and volume attachment resources, then pass in the server ID to have the volumes attached to one server. Also moves the current basic example into a resource_group subdirectory, so we can collect related examples, and make more obvious that the volume_with_attachment template is part of another example rather than a standalone example template. Change-Id: I1ffc1656286a981b6dc219038e03adbb8d5af775
27 lines
583 B
YAML
27 lines
583 B
YAML
heat_template_version: 2013-05-23
|
|
|
|
parameters:
|
|
volume_size:
|
|
type: number
|
|
description: Size of volume to attach to instance
|
|
default: 1
|
|
constraints:
|
|
- range: {min: 1, max: 10}
|
|
|
|
instance_id:
|
|
type: string
|
|
description: Server to attach volume to
|
|
|
|
resources:
|
|
volume:
|
|
type: OS::Cinder::Volume
|
|
properties:
|
|
size: { get_param: volume_size }
|
|
description: Volume for stack
|
|
|
|
volume_attachment:
|
|
type: OS::Cinder::VolumeAttachment
|
|
properties:
|
|
volume_id: { get_resource: volume }
|
|
instance_uuid: { get_param: instance_id}
|