description: examples/scale_map_hot.yaml
heat_template_version: '2013-05-23'
resources:
  ComputeUser:
    properties:
      Policies:
      - get_param: ComputeAccessPolicy
    type: AWS::IAM::User
  GlobalAccessPolicy:
    type: OS::Heat::AccessPolicy
  NovaCompute0:
    metadata:
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute0Key
          path: NovaCompute0Config.Metadata
          secret_access_key:
            get_attr:
            - NovaCompute0Key
            - SecretAccessKey
          stack_name:
            get_param: AWS::StackName
    properties:
      image:
        get_param: ComputeImage
    type: OS::Nova::Server
  NovaCompute0CompletionCondition:
    depends_on: notcompute
    properties:
      Count: '1'
      Handle:
        get_resource: NovaCompute0CompletionHandle
      Timeout: '1800'
    type: AWS::CloudFormation::WaitCondition
  NovaCompute0CompletionHandle:
    type: AWS::CloudFormation::WaitConditionHandle
  NovaCompute0Config:
    metadata:
      completion-handle:
        get_resource: NovaCompute0CompletionHandle
      hosts:
        list_join:
        - '

          '
        - - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute0
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute0
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute0
                      - show
                  - local
          - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute3
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute3
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute3
                      - show
                  - local
          - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute4
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute4
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute4
                      - show
                  - local
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute0Key
          path: NovaCompute0Config.Metadata
          secret_access_key:
            get_attr:
            - NovaCompute0Key
            - SecretAccessKey
          stack_name:
            get_param: AWS::StackName
    type: AWS::AutoScaling::LaunchConfiguration
  NovaCompute0Key:
    properties:
      UserName:
        get_param: ComputeUser
    type: AWS::IAM::AccessKey
  NovaCompute3:
    metadata:
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute3Key
          path: NovaCompute3Config.Metadata
          secret_access_key:
            get_attr:
            - NovaCompute3Key
            - SecretAccessKey
          stack_name:
            get_param: AWS::StackName
    properties:
      image:
        get_param: ComputeImage
    type: OS::Nova::Server
  NovaCompute3CompletionCondition:
    depends_on: notcompute
    properties:
      Count: '1'
      Handle:
        get_resource: NovaCompute3CompletionHandle
      Timeout: '1800'
    type: AWS::CloudFormation::WaitCondition
  NovaCompute3CompletionHandle:
    type: AWS::CloudFormation::WaitConditionHandle
  NovaCompute3Config:
    metadata:
      completion-handle:
        get_resource: NovaCompute3CompletionHandle
      hosts:
        list_join:
        - '

          '
        - - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute0
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute0
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute0
                      - show
                  - local
          - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute3
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute3
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute3
                      - show
                  - local
          - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute4
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute4
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute4
                      - show
                  - local
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute3Key
          path: NovaCompute3Config.Metadata
          secret_access_key:
            get_attr:
            - NovaCompute3Key
            - SecretAccessKey
          stack_name:
            get_param: AWS::StackName
    type: AWS::AutoScaling::LaunchConfiguration
  NovaCompute3Key:
    properties:
      UserName:
        get_param: ComputeUser
    type: AWS::IAM::AccessKey
  NovaCompute4:
    metadata:
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute4Key
          path: NovaCompute4Config.Metadata
          secret_access_key:
            get_attr:
            - NovaCompute4Key
            - SecretAccessKey
          stack_name:
            get_param: AWS::StackName
    properties:
      image:
        get_param: ComputeImage
    type: OS::Nova::Server
  NovaCompute4CompletionCondition:
    depends_on: notcompute
    properties:
      Count: '1'
      Handle:
        get_resource: NovaCompute4CompletionHandle
      Timeout: '1800'
    type: AWS::CloudFormation::WaitCondition
  NovaCompute4CompletionHandle:
    type: AWS::CloudFormation::WaitConditionHandle
  NovaCompute4Config:
    metadata:
      completion-handle:
        get_resource: NovaCompute4CompletionHandle
      hosts:
        list_join:
        - '

          '
        - - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute0
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute0
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute0
                      - show
                  - local
          - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute3
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute3
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute3
                      - show
                  - local
          - list_join:
            - ' '
            - - Fn::Select:
                - 0
                - Fn::Select:
                  - ctlplane
                  - get_attr:
                    - NovaCompute4
                    - networks
              - Fn::Select:
                - name
                - get_attr:
                  - NovaCompute4
                  - show
              - list_join:
                - .
                - - Fn::Select:
                    - name
                    - get_attr:
                      - NovaCompute4
                      - show
                  - local
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute4Key
          path: NovaCompute4Config.Metadata
          secret_access_key:
            get_attr:
            - NovaCompute4Key
            - SecretAccessKey
          stack_name:
            get_param: AWS::StackName
    type: AWS::AutoScaling::LaunchConfiguration
  NovaCompute4Key:
    properties:
      UserName:
        get_param: ComputeUser
    type: AWS::IAM::AccessKey
