Fixup https://review.openstack.org/#/c/33308.
[apex-tripleo-heat-templates.git] / rabbitmq.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Dedicated RabbitMQ Server'
3 Parameters:
4   KeyName: 
5     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
6     Type: String
7     Default: default
8   InstanceType:
9     Description: Use this flavor
10     Type: String
11     Default: bm.small
12   RabbitMQImage:
13     Type: String
14 Resources:
15   RabbitMQ:
16     Type: AWS::EC2::Instance
17     Metadata:
18       OpenStack::Role: stateful
19       OpenStack::ImageBuilder::Elements: [ rabbitmq-server ]
20       rabbitmq:
21         password_handle: {Ref: RabbitMQPasswordHandle}
22     Properties:
23       ImageId:
24         {Ref: RabbitMQImage}
25       InstanceType: {Ref: InstanceType}
26       KeyName: {Ref: KeyName}
27   RabbitMQPasswordHandle:
28     Type: AWS::CloudFormation::WaitConditionHandle
29   RabbitMQPassword:
30     DependsOn: RabbitMQ
31     Type: AWS::CloudFormation::WaitCondition
32     Properties:
33       Handle: {Ref: RabbitMQPasswordHandle}
34       Timeout: 60
35 Outputs:
36     RabbitMQHost: 
37         Fn::GetAtt: [ RabbitMQ , PrivateIp ]
38     RabbitMQPassword:
39         Fn::GetAtt: [ RabbitMQPassword, Data ]