-
Notifications
You must be signed in to change notification settings - Fork 12
/
multi_stack.yaml
67 lines (54 loc) · 1.9 KB
/
multi_stack.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#heat-template-version
heat_template_version: 2021-04-16
description: >
This template demonstrates how you can nest stacks. This template reads in
the basic_server.yaml template and launches two copies of it.
parameters:
key_name:
type: string
description: Name of an existing keypair to enable SSH access to the instance
constraints:
- custom_constraint: nova.keypair
flavor:
type: string
description: The Nectar instance flavour the instance should use
default: m3.xsmall
constraints:
- custom_constraint: nova.flavor
image:
type: string
description: ID or name of the image to use for the instance to be created
default: NeCTAR Ubuntu 22.04 LTS (Jammy) amd64
availability_zone:
type: string
description: The Nectar availability zone to launch in
resources:
stack_one:
# https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Heat::Stack
type: OS::Heat::Stack
properties:
template: { get_file: basic_server.yaml }
timeout: 60
parameters:
key_name: { get_param: key_name }
image: { get_param: image }
flavor: { get_param: flavor }
availability_zone: { get_param: availability_zone }
stack_two:
# https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Heat::Stack
type: OS::Heat::Stack
properties:
template: { get_file: basic_server.yaml }
timeout: 60
parameters:
key_name: { get_param: key_name }
image: { get_param: image }
flavor: { get_param: flavor }
availability_zone: { get_param: availability_zone }
outputs:
stack_one_outputs:
description: Output of stack_one.
value: { get_attr: [stack_one, outputs] }
stack_two_outputs:
description: Output of stack_two.
value: { get_attr: [stack_two, outputs] }