From 758001d126de53c5617d01ea9e8205003329a3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Tue, 5 Mar 2024 16:35:05 +0100 Subject: [PATCH] Remove datadog monitoring --- .github/workflows/check_deploy.yml | 1 - tf/environments/prod/main.tf | 4 +--- tf/environments/prod/variables.tf | 3 --- tf/modules/clickhouse/main.tf | 1 - tf/modules/clickhouse/templates/clickhouse-setup.sh | 3 --- tf/modules/clickhouse/variables.tf | 3 --- 6 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/check_deploy.yml b/.github/workflows/check_deploy.yml index 7dd30cd2..eb1ea2c9 100644 --- a/.github/workflows/check_deploy.yml +++ b/.github/workflows/check_deploy.yml @@ -107,7 +107,6 @@ jobs: env: TF_VAR_aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} TF_VAR_aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VAR_datadog_api_key: ${{ secrets.DATADOG_API_KEY }} TF_VAR_ooni_pg_password: ${{ secrets.OONI_PG_PASSWORD }} steps: diff --git a/tf/environments/prod/main.tf b/tf/environments/prod/main.tf index 69439852..e0a3c7bf 100644 --- a/tf/environments/prod/main.tf +++ b/tf/environments/prod/main.tf @@ -120,7 +120,6 @@ resource "aws_route_table_association" "a" { # # aws_vpc_id = aws_vpc.main.id # aws_subnet_id = aws_subnet.main[0].id -# datadog_api_key = var.datadog_api_key # aws_access_key_id = var.aws_access_key_id # aws_secret_access_key = var.aws_secret_access_key # key_name = var.key_name @@ -205,8 +204,7 @@ resource "aws_launch_template" "app" { user_data = base64encode(templatefile("${path.module}/templates/ecs-setup.sh", { ecs_cluster_name = local.ecs_cluster_name, - ecs_cluster_tags = local.tags, - datadog_api_key = var.datadog_api_key, + ecs_cluster_tags = local.tags })) update_default_version = true diff --git a/tf/environments/prod/variables.tf b/tf/environments/prod/variables.tf index 0b3027ca..1ce7610f 100644 --- a/tf/environments/prod/variables.tf +++ b/tf/environments/prod/variables.tf @@ -1,6 +1,3 @@ -variable "datadog_api_key" { - sensitive = true -} variable "aws_access_key_id" { sensitive = true } diff --git a/tf/modules/clickhouse/main.tf b/tf/modules/clickhouse/main.tf index 74c7d76d..367206d1 100644 --- a/tf/modules/clickhouse/main.tf +++ b/tf/modules/clickhouse/main.tf @@ -51,7 +51,6 @@ resource "aws_instance" "clickhouse_server_prod_tier1" { } user_data = templatefile("${path.module}/templates/clickhouse-setup.sh", { - datadog_api_key = var.datadog_api_key, hostname = local.clickhouse_hostname, device_name = local.clickhouse_device_name }) diff --git a/tf/modules/clickhouse/templates/clickhouse-setup.sh b/tf/modules/clickhouse/templates/clickhouse-setup.sh index 4ebc4f5e..a7d4a281 100644 --- a/tf/modules/clickhouse/templates/clickhouse-setup.sh +++ b/tf/modules/clickhouse/templates/clickhouse-setup.sh @@ -1,9 +1,6 @@ #!/bin/bash sudo hostnamectl set-hostname --static ${hostname} -# Install datadog agent -DD_API_KEY=${datadog_api_key} DD_SITE="datadoghq.eu" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)" - # This only needs to be run the first time to initialize the volume # sudo mkfs.ext4 -q -F ${device_name} sudo mkdir -p /var/lib/clickhouse diff --git a/tf/modules/clickhouse/variables.tf b/tf/modules/clickhouse/variables.tf index 9413b7ce..680fbc19 100644 --- a/tf/modules/clickhouse/variables.tf +++ b/tf/modules/clickhouse/variables.tf @@ -1,6 +1,3 @@ -variable "datadog_api_key" { - sensitive = true -} variable "aws_access_key_id" { sensitive = true }