diff options
-rw-r--r-- | jinwei.me/config/roles/debian_init/tasks/main.yaml | 4 | ||||
-rw-r--r-- | jinwei.me/infra/dockerhub.tf | 6 | ||||
-rw-r--r-- | jinwei.me/infra/variables.tf | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/jinwei.me/config/roles/debian_init/tasks/main.yaml b/jinwei.me/config/roles/debian_init/tasks/main.yaml index 750f83c..539c43f 100644 --- a/jinwei.me/config/roles/debian_init/tasks/main.yaml +++ b/jinwei.me/config/roles/debian_init/tasks/main.yaml | |||
@@ -92,3 +92,7 @@ | |||
92 | src: "//{{ lookup('aws_ssm', '/jinwei-me/hetzner/storagebox') }}" | 92 | src: "//{{ lookup('aws_ssm', '/jinwei-me/hetzner/storagebox') }}" |
93 | path: "{{ samba_mount_point }}" | 93 | path: "{{ samba_mount_point }}" |
94 | become: true | 94 | become: true |
95 | |||
96 | - name: Install Datadog | ||
97 | command: | ||
98 | DD_API_KEY={{ lookup('aws_secretsmanager_secret', '/jinwei-me/datadog/api_key') }} DD_SITE="datadoghq.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)" | ||
diff --git a/jinwei.me/infra/dockerhub.tf b/jinwei.me/infra/dockerhub.tf index 00a3bf2..9ada77d 100644 --- a/jinwei.me/infra/dockerhub.tf +++ b/jinwei.me/infra/dockerhub.tf | |||
@@ -9,3 +9,9 @@ resource "aws_ssm_parameter" "dockerhub_token" { | |||
9 | type = "SecureString" | 9 | type = "SecureString" |
10 | value = var.dockerhub_token | 10 | value = var.dockerhub_token |
11 | } | 11 | } |
12 | |||
13 | resource "aws_secretsmanager_secret" "datadog_api_key" { | ||
14 | name = "/${local.name}/datadog/api_key" | ||
15 | type = "SecureString" | ||
16 | value = var.datadog_api_key | ||
17 | } | ||
diff --git a/jinwei.me/infra/variables.tf b/jinwei.me/infra/variables.tf index f364ef4..11cf2cf 100644 --- a/jinwei.me/infra/variables.tf +++ b/jinwei.me/infra/variables.tf | |||
@@ -100,3 +100,9 @@ variable "dockerhub_token" { | |||
100 | type = string | 100 | type = string |
101 | sensitive = true | 101 | sensitive = true |
102 | } | 102 | } |
103 | |||
104 | variable "datadog_api_key" { | ||
105 | description = "Datadog.com API Key" | ||
106 | type = string | ||
107 | sensitive = true | ||
108 | } | ||