@@ -15,6 +15,49 @@ module "backend" {
1515 environment = var. environment
1616}
1717
18+ module "secrets" {
19+ source = " github.com/codeforamerica/tofu-modules-aws-secrets?ref=1.0.0"
20+
21+ project = var. project_name
22+ environment = var. environment
23+
24+ secrets = {
25+ database = {
26+ description = " Credentials for our Database."
27+ name = " /asap-pdf/production/database"
28+ start_value = jsonencode ({
29+ host = " "
30+ name = " "
31+ username = " "
32+ password = " "
33+ })
34+ }
35+ redis = {
36+ description = " The Redis/Elasticache url."
37+ name = " /asap-pdf/production/redis"
38+ start_value = jsonencode ({
39+ url = " "
40+ })
41+ }
42+ rails = {
43+ description = " The Rails master key."
44+ name = " /asap-pdf/production/rails"
45+ start_value = jsonencode ({
46+ master_key = " "
47+ secret_key = " "
48+ })
49+ }
50+ google = {
51+ description = " The Rails master key."
52+ name = " /asap-pdf/production/GOOGLE_AI_KEY"
53+ }
54+ anthropic = {
55+ description = " The Rails master key."
56+ name = " /asap-pdf/production/ANTHROPIC_KEY"
57+ }
58+ }
59+ }
60+
1861module "logging" {
1962 source = " github.com/codeforamerica/tofu-modules-aws-logging?ref=2.1.0"
2063
@@ -59,57 +102,14 @@ module "deployment" {
59102 project_name = var. project_name
60103 environment = var. environment
61104
62- db_password_secret_arn = module. database . db_password_secret_arn
105+ db_password_secret_arn = " ${ module . secrets . secrets [ " database" ] . secret_arn } :password "
63106 aws_account_id = data. aws_caller_identity . identity . account_id
64107 backend_kms_arn = module. backend . kms_key
65108 document_inference_lambda_arn = module. lambda . document_inference_lambda_arn
66109 document_inference_evaluation_lambda_arn = module. lambda . document_inference_evaluation_lambda_arn
67110 evaluation_lambda_arn = module. lambda . evaluation_lambda_arn
68111}
69112
70- module "secrets" {
71- source = " github.com/codeforamerica/tofu-modules-aws-secrets?ref=1.0.0"
72-
73- project = var. project_name
74- environment = var. environment
75-
76- secrets = {
77- database = {
78- description = " Credentials for our Database."
79- name = " /asap-pdf/production/database"
80- start_value = jsonencode ({
81- host = " "
82- name = " "
83- username = " "
84- password = " "
85- })
86- }
87- redis = {
88- description = " The Redis/Elasticache url."
89- name = " /asap-pdf/production/redis"
90- start_value = jsonencode ({
91- url = " "
92- })
93- }
94- rails = {
95- description = " The Rails master key."
96- name = " /asap-pdf/production/rails"
97- start_value = jsonencode ({
98- master_key = " "
99- secret_key = " "
100- })
101- }
102- google = {
103- description = " The Rails master key."
104- name = " /asap-pdf/production/GOOGLE_AI_KEY"
105- }
106- anthropic = {
107- description = " The Rails master key."
108- name = " /asap-pdf/production/ANTHROPIC_KEY"
109- }
110- }
111- }
112-
113113# ECS
114114module "ecs" {
115115 source = " ./modules/ecs"
0 commit comments