#!/bin/bash

set -e -u
set -o pipefail

curl  -X POST -H "Content-type: application/json" \
    -d '{
            "title": "'$TITLE'",
            "text": "'$TEXT'",
            "priority": "'$PRIORITY'",
            "tags": ["deployment:'$AWS_ENV'", "host:'$(hostname -f)'"]
        }' \
"https://app.datadoghq.com/api/v1/events?api_key=$DATADOG_API_KEY"
