+;Here we define a bunch of variables to make our config shorter and easier to understand
 (def elb-8080->8080  {:LoadBalancerPort 8080
                       :InstancePort 8080
                       :Protocol "http"

                              :FromPort 8080
                              :ToPort 8080}]
                   :Egress $sg-egress-all}]

 :LoadBalancer {:LoadBalancerName $app-name
                :Listeners [elb-8080->8080]
                :SecurityGroups [elb-sg-name $sg-ssh]
                :Subnets $elb-subnets-be
                :Scheme "internal"
                :HealthCheck elb-healthcheck-ping}

 :Role {:RoleName $app-name
        :Policies  [{:PolicyName "full-access"
                     :PolicyDocument [{:Action "*",
                                       :Resource "*"}]}]}
 }

                           :UnhealthyThreshold 4
                           :Interval 12
                           :Timeout 5})
(def elb-sg-name (str $app-name "-lb"));$app-name is made available by Shuppet
;Here we define a configuration as a Clojure map, it must be at the end of the file to be used by Shuppet.
;Security group doc http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html
{:SecurityGroups [;Define a security group for our elb
                  {:GroupName elb-sg-name
                   :GroupDescription (str "Security group for load balancer " $app-name)
                   :VpcId $vpc-id
                   :Ingress [{:IpRanges $private-ips
