Reuse the various service passwords as db passwords.
[apex-tripleo-heat-templates.git] / examples / scale_map2.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Parameters:
3   AllHosts:
4     Type: String
5   ComputeImage:
6     Type: String
7 Resources:
8   ComputeAccessPolicy:
9     Type: OS::Heat::AccessPolicy
10     Properties:
11       AllowedResources: [ NovaCompute0 ]
12   NovaCompute0Key:
13     Type: AWS::IAM::AccessKey
14     Properties:
15       UserName:
16         Ref: ComputeUser
17   NovaCompute0CompletionCondition:
18     Type: AWS::CloudFormation::WaitCondition
19     DependsOn: notcompute
20     Properties:
21       Handle: {Ref: NovaCompute0CompletionHandle}
22       Count: '1'
23       Timeout: '1800'
24   NovaCompute0CompletionHandle:
25     Type: AWS::CloudFormation::WaitConditionHandle
26   NovaCompute0:
27     Type: OS::Nova::Server
28     Properties:
29       image:
30         Ref: ComputeImage
31     Metadata:
32       os-collect-config:
33         cfn:
34           access_key_id:
35             Ref: NovaCompute0Key
36           secret_access_key:
37             Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
38           stack_name: {Ref: 'AWS::StackName'}
39           path: NovaCompute0Config.Metadata
40   NovaCompute0Config:
41     Type: AWS::AutoScaling::LaunchConfiguration
42     Metadata:
43       completion-handle:
44         Ref: NovaCompute0CompletionHandle
45       os-collect-config:
46         cfn:
47           access_key_id:
48             Ref: NovaCompute0Key
49           secret_access_key:
50             Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
51           stack_name: {Ref: 'AWS::StackName'}
52           path: NovaCompute0Config.Metadata
53       hosts:
54         Ref: AllHosts