
    {
      "requisiteStageRefIds": [""],
      "refId": "master",
      "type": "deploy",
      "name": "Deploy {{ data.app.environment }}",
      "clusters": [
        {
          "base64UserData": "{{ data.app.encoded_user_data }}",
          "application": "{{ data.app.appname }}",
          "strategy": "{{ data.deploy_strategy }}",
          "maxRemainingAsgs": 2,
          "scaleDown": true,
          "capacity": {
            "min": {{ data.asg.min_inst }},
            "max": {{ data.asg.max_inst }},
            "desired": {{ data.asg.min_inst }}
          },
          "blockDevices": [],
          "targetHealthyDeployPercentage": 100,
          "cooldown": 10,
          "healthCheckType": "{{ data.asg.hc_type }}",
          "healthCheckGracePeriod": "{{ data.asg.hc_grace_period }}",
          {% if data.asg.has_provider_healthcheck -%}
          "interestingHealthProviderNames": {{ data.asg.provider_healthcheck }},
          {%- endif %}
          "instanceMonitoring": false,
          "ebsOptimized": false,
          "iamRole": "{{ data.app.instance_profile }}",
          "terminationPolicies": [
            "Default"
          ],
          "availabilityZones": {{ data.app.az_dict }},
          "keyPair": "{{ data.asg.ssh_keypair }}",
          "suspendedProcesses": [],
          "securityGroups": {{ data.app.instance_security_groups }},
          "tags": {
            {% if data.app.custom_tags %}
                {% for tag_key, tag_value in data.app.custom_tags.items() -%}
                  "{{ tag_key }}": "{{ tag_value }}",
                {% endfor -%}
            {% endif %}
            "app_group": "{{ data.app.group_name }}",
            "app_name": "{{ data.app.appname }}",
            "owner_email": "{{ data.app.owner_email }}"
           },
          "subnetType": "{{ data.asg.subnet_purpose }}",
          "virtualizationType": null,
          "loadBalancers": {{ data.app.elb }},
          "instanceType": "{{ data.app.instance_type }}",
          "useSourceCapacity": false,
          "associatePublicIpAddress": {{ data.asg.enable_public_ips }},
          "provider": "aws",
          "cloudProvider": "aws",
          "account": "{{ data.app.environment }}"
        }
      ],
      "comments": "",
      "restrictExecutionDuringTimeWindow": false
    }
