How to define object as the value for a variable in template?

Hi all,
I want to define services in my pipeline created by a template (Templates | Drone)
How can I configure it? I see how to define string values, but I need an object like this

  services:
    - name: service-postgres
      image: bitnami/postgresql:12.5.0
      environment:
        POSTGRESQL_DATABASE: dialer
        POSTGRESQL_USERNAME: dialer-user
        POSTGRESQL_PASSWORD: dialer-pass
      ports:
        - 5432

    - name: asterisk-server
      image: myimage
      environment:
        AMI_USER: user
        AMI_USER_PASSWORD: pass
        POSTGRES_HOST: service-postgres
        POSTGRES_PORT: 5432
        POSTGRES_DB: asterisk
        POSTGRES_USER: dialer-user
        POSTGRES_PASS: dialer-pass

Cheers,
Andrey