{
  "name": "{{ name }}",
  "description": "{{ description | default("") }}",
  "local_path": "{{ local_path }}",
  "scm_type": "{{ scm_type | default("") }}",
  {% if ( scm_type | lower ) | default("") == "git" %}
    "scm_url": "{{ scm_url }}",
    "scm_branch": "{{ scm_branch }}",
    "scm_refspec": "{{ scm_refspec }}",
    "scm_clean": "{{ scm_clean | default(false) }}",
    "scm_track_submodules": "{{ scm_track_submodules | default(false) }}",
    "scm_delete_on_update": "{{ scm_delete_on_update | default(false) }}",
  {% endif %}
  {% if credential_id is defined %}
    "credential": {{ credential_id }},
  {% endif %}
  "timeout": "{{ timeout | default(0) }}",
  "organization": "{{ organization_id | default(1) }}",
  "scm_update_on_launch": "{{ scm_update_on_launch | default(false) }}",
  "scm_update_cache_timeout": "{{ scm_update_cache_timeout | default(0) }}",
  "allow_override": "{{ allow_override | default(false) }}",
  "default_environment": "{{ default_environment_id | default(null) }}"
}
