This commit is contained in:
Patrick de Ruiter 2021-10-05 11:04:22 +02:00
parent 9e755e45ca
commit 4ec2ec4da0
5 changed files with 33 additions and 24 deletions

View File

@ -1,6 +1,6 @@
resource "datadog_dashboard" "beacon" {
resource "datadog_dashboard" "app_dashboard" {
title = var.app_name
description = "A Datadog Dashboard for the ${kubernetes_deployment.beacon.metadata[0].name} deployment"
description = "A Datadog Dashboard for the ${var.app_name} deployment on the ${var.stage} environment"
layout_type = "ordered"
is_read_only = true
@ -52,7 +52,7 @@ resource "datadog_dashboard" "beacon" {
widget {
alert_graph_definition {
alert_id = datadog_monitor.beacon.id
alert_id = datadog_monitor.app_monitor.id
title = "Kubernetes Node CPU"
viz_type = "timeseries"
}

View File

@ -14,6 +14,6 @@ resource "datadog_monitor" "app_monitor" {
notify_no_data = true
tags = ["cfa:${var.cfa_name}", "team:${var.team_name}" "app:${var.app_name}", "env:${var.stage}"]
tags = ["cfa:${var.cfa_name}", "team:${var.team_name}", "app:${var.app_name}", "env:${var.stage}"]
}

View File

@ -21,7 +21,7 @@ resource "datadog_synthetics_test" "app_sythetics" {
name = "${var.app_name} API check"
message = "Oh no! there seems to be a problem with ${var.app_name} please investigate"
tags = ["cfa:${var.cfa_name}", "team:${var.team_name}" "app:${var.app_name}", "env:${var.stage}"]
tags = ["cfa:${var.cfa_name}", "team:${var.team_name}", "app:${var.app_name}", "env:${var.stage}"]
status = "live"
}

View File

@ -1,11 +1,11 @@
app_namespace = "plaap"
app_name = "blah"
image_name = "name/image"
region = "eu-west-1"
api_key = "2fcc093ed06e4dbe0935433495898cad"
app_key = "aaf4a9654b82cfa8b23b2d65801901a4ad9d35ed"
datadog_site = "https://api.datadoghq.eu/"
aws_profile = "ws-playground-applicatiebeheer"
environment = "test"
prefix_slug = "sanoma"
team = "ws-playground-applicatiebeheer"
app_name = "blah"
image_name = "name/image"
region = "eu-west-1"
api_key = "2fcc093ed06e4dbe0935433495898cad"
app_key = "aaf4a9654b82cfa8b23b2d65801901a4ad9d35ed"
datadog_site = "https://api.datadoghq.eu/"
aws_profile = "ws-playground-applicatiebeheer"
stage = "test"
cfa_name = "sanoma"
team_name = "ws-playground-applicatiebeheer"

View File

@ -3,27 +3,36 @@ variable "app_namespace" {
type = string
}
variable "cfa_name" {
description = "Name of the CFA"
type = string
}
variable "app_name" {
description = "Name of the application"
type = string
}
variable "image_name" {
description = "Name of the Docker imagei to use"
variable "team_name" {
description = "Name of the responsible team"
type = string
}
variable "image_name" {
description = "Name of the Docker Image"
type = string
}
variable "region" {
description = "Defines the AWS region where the resources are located"
type = string
}
variable "environment" {
description = "Specifies the URL for datadog to monitor"
type = string
}
variable "url" {
description = "Specifies the URL for datadog to monitor"
variable "stage" {
description = "Specifies the stage to monitor (dev, tst, stg, prd)"
type = string
}
variable "url" {
description = "Specifies the URL for datadogi Synthetics to monitor"
type = string
}