-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_instance_volume.yaml
49 lines (48 loc) · 1.32 KB
/
create_instance_volume.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
heat_template_version: 2013-05-23
description: InstanceVolume
parameters:
image_id:
type: string
description: image UUID
default: ac89d3af-d647-4e54-880a-acf903eb0cbc
key_name:
type: string
description: key pair name
default: minmin
instance_type:
type: string
description: instance flavor
default: m1.small
network_id:
type: string
description: instance network uuid
default: f30f8be3-c0dd-4695-a345-420f1199aa7e
availability_zone:
type: string
description: availability zone
default: "nova"
volume_size:
type: number
description: cinder volume size
default: 1
resources:
cinder_volume:
type: OS::Cinder::Volume
properties:
size: { get_param: volume_size }
metadata: {"stack": {get_param: "OS::stack_id"}}
nova_instance:
type: OS::Nova::Server
properties:
availability_zone: { get_param: availability_zone }
image: { get_param: image_id }
flavor: { get_param: instance_type }
key_name: { get_param: key_name }
networks:
- network: {get_param: network_id}
metadata: {"stack": {get_param: "OS::stack_id"}}
cinder_volume_attachment:
type: OS::Cinder::VolumeAttachment
properties:
volume_id: { get_resource: cinder_volume }
instance_uuid: { get_resource: nova_instance }