This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
secrets.tf
44 lines (36 loc) · 1.4 KB
/
secrets.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# #########################################
# Secrets - These will already exist
# #########################################
data "aws_secretsmanager_secret_version" "api_gateway_header" {
secret_id = "${local.config_var_prefix}header-x-secret"
}
data "aws_secretsmanager_secret_version" "device-check" {
secret_id = "${local.config_var_prefix}device-check"
}
data "aws_secretsmanager_secret_version" "encrypt" {
secret_id = "${local.config_var_prefix}encrypt"
}
data "aws_secretsmanager_secret_version" "exposures" {
secret_id = "${local.config_var_prefix}exposures"
}
data "aws_secretsmanager_secret_version" "jwt" {
secret_id = "${local.config_var_prefix}jwt"
}
data "aws_secretsmanager_secret_version" "rds" {
secret_id = "${local.config_var_prefix}rds"
}
# #########################################
# Optional secrets - These exist for some instances
# #########################################
data "aws_secretsmanager_secret_version" "cct" {
count = contains(var.optional_secrets_to_include, "cct") ? 1 : 0
secret_id = "${local.config_var_prefix}cct"
}
data "aws_secretsmanager_secret_version" "cso" {
count = contains(var.optional_secrets_to_include, "cso") ? 1 : 0
secret_id = "${local.config_var_prefix}cso"
}
data "aws_secretsmanager_secret_version" "twilio" {
count = contains(var.optional_secrets_to_include, "twilio") ? 1 : 0
secret_id = "${local.config_var_prefix}twilio"
}