aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-01-11 19:55:59 -0800
committerclarkzjw <[email protected]>2023-01-11 19:55:59 -0800
commit1863462e23f8d7099bb26c3a11d5ed9a2cce54cd (patch)
tree40702950cbd22c8071fb6ea1424731a664fda54b
parent5398d8f78ffb175176d6143ca8c295988076a2c2 (diff)
downloadjinwei.me-1863462e23f8d7099bb26c3a11d5ed9a2cce54cd.tar.gz
use aws_ssm
-rw-r--r--jinwei.me/config/roles/debian_init/tasks/main.yaml2
-rw-r--r--jinwei.me/infra/dockerhub.tf2
2 files changed, 2 insertions, 2 deletions
diff --git a/jinwei.me/config/roles/debian_init/tasks/main.yaml b/jinwei.me/config/roles/debian_init/tasks/main.yaml
index 539c43f..a8d45d7 100644
--- a/jinwei.me/config/roles/debian_init/tasks/main.yaml
+++ b/jinwei.me/config/roles/debian_init/tasks/main.yaml
@@ -95,4 +95,4 @@
95 95
96- name: Install Datadog 96- name: Install Datadog
97 command: 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)" 98 DD_API_KEY={{ lookup('aws_ssm', '/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 9ada77d..f4c6bf5 100644
--- a/jinwei.me/infra/dockerhub.tf
+++ b/jinwei.me/infra/dockerhub.tf
@@ -10,7 +10,7 @@ resource "aws_ssm_parameter" "dockerhub_token" {
10 value = var.dockerhub_token 10 value = var.dockerhub_token
11} 11}
12 12
13resource "aws_secretsmanager_secret" "datadog_api_key" { 13resource "aws_ssm_parameter" "datadog_api_key" {
14 name = "/${local.name}/datadog/api_key" 14 name = "/${local.name}/datadog/api_key"
15 type = "SecureString" 15 type = "SecureString"
16 value = var.datadog_api_key 16 value = var.datadog_api_key
Powered by cgit v1.2.3 (git 2.41.0)