Heartbeat Auto-discovery not working for AWS ELB

We are trying setup for AWS ELB Heartbeats. We got way to do in document https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-autodiscover.html but when we tried the same then not getting any beats from ELB in Uptime.

Please find config file below.

apiVersion: v1
kind: ConfigMap
metadata:
  name: heartbeat-deployment-config
  namespace: {{ .Values.dataplane.namespace }}
  labels:
    k8s-app: heartbeat
data:
  heartbeat.yml: |-
    heartbeat.autodiscover:
      providers:
        - type: aws_elb
          period: 1m
          regions:
            - ***********
          access_key_id: '************************'
          secret_access_key: '*****************'
          templates:
              config:
                - type: tcp
                  hosts: ["${data.host}:${data.port}"]
                  schedule: "@every 10s"
                  timeout: 1s


    processors:
      - add_cloud_metadata:

    cloud.id: ${ELASTIC_CLOUD_ID}
    cloud.auth: ${ELASTIC_CLOUD_AUTH}
    setup.ilm.policy_file: /certs/ilm_policy.json
    output.elasticsearch:
      hosts: ['https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}']
      username: ${ELASTICSEARCH_USERNAME:elastic}
      password: ${ELASTICSEARCH_PASSWORD:changeme}
      ssl:
        enabled: true
        verification_mode: none

Please help me on this ?

FYI: @vamsikrishna_medeti

Hey @Ayush_Agrahari,

I think that the templates need to be a list, so it should be defined like that:

          templates:
              - config:
                - type: tcp
                  hosts: ["${data.host}:${data.port}"]
                  schedule: "@every 10s"
                  timeout: 1s

Notice the - before config.