Skip to content

Commit 6a8aa7c

Browse files
authored
Merge pull request #41 from MITLibraries/dev
Dev-to-Stage: New geo-harvester ECR (and typo fix for browsertrix)
2 parents 3d8d7a8 + 284c2d2 commit 6a8aa7c

File tree

2 files changed

+109
-20
lines changed

2 files changed

+109
-20
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ then replace all the ssm parameter references for `oidc_arn` with `aws_iam_openi
8888
| ecr\_ppod | ./modules/ecr | n/a |
8989
| ecr\_sapinvoices | ./modules/ecr | n/a |
9090
| ecr\_slingshot | ./modules/ecr | n/a |
91-
| ecr\_timdex\_broswertrix | ./modules/ecr | n/a |
91+
| ecr\_timdex\_browsertrix | ./modules/ecr | n/a |
92+
| ecr\_timdex\_geo | ./modules/ecr | n/a |
9293
| ecr\_timdex\_lambdas | ./modules/ecr | n/a |
9394
| ecr\_timdex\_tim | ./modules/ecr | n/a |
9495
| ecr\_timdex\_transmogrifier | ./modules/ecr | n/a |
@@ -124,10 +125,10 @@ then replace all the ssm parameter references for `oidc_arn` with `aws_iam_openi
124125
| alma\_webhook\_lambdas\_makefile | Full contents of the Makefile for the alma-webhook-lambdas repo (allows devs to push to Dev account only) |
125126
| alma\_webhook\_lambdas\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the alma-webhook-lambdas repo |
126127
| alma\_webhook\_lambdas\_stage\_build\_workflow | Full contents of the stage-build.yml for the alma-webhook-lambdas repo |
127-
| broswertrix\_dev\_build\_workflow | Full contents of the dev-build.yml for the browsertrix-harvester repo |
128-
| broswertrix\_makefile | Full contents of the Makefile for the browsertrix-harvester repo (allows devs to push to Dev account only) |
129-
| broswertrix\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the browsertrix-harvester repo |
130-
| broswertrix\_stage\_build\_workflow | Full contents of the stage-build.yml for the browsertrix-harvester repo |
128+
| browsertrix\_dev\_build\_workflow | Full contents of the dev-build.yml for the browsertrix-harvester repo |
129+
| browsertrix\_makefile | Full contents of the Makefile for the browsertrix-harvester repo (allows devs to push to Dev account only) |
130+
| browsertrix\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the browsertrix-harvester repo |
131+
| browsertrix\_stage\_build\_workflow | Full contents of the stage-build.yml for the browsertrix-harvester repo |
131132
| bursar\_dev\_build\_workflow | Full contents of the dev-build.yml for the alma-bursartransfer repo |
132133
| bursar\_makefile | Full contents of the Makefile for the alma-bursartransfer repo (allows devs to push to Dev account only) |
133134
| bursar\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the alma-bursartransfer repo |
@@ -144,6 +145,10 @@ then replace all the ssm parameter references for `oidc_arn` with `aws_iam_openi
144145
| dss\_fargate\_makefile | Full contents of the Makefile for the dss repo (allows devs to push to Dev account only) |
145146
| dss\_fargate\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the dss repo |
146147
| dss\_fargate\_stage\_build\_workflow | Full contents of the stage-build.yml for the dss repo |
148+
| geo\_dev\_build\_workflow | Full contents of the dev-build.yml for the geo-harvester repo |
149+
| geo\_makefile | Full contents of the Makefile for the geo-harvester repo (allows devs to push to Dev account only) |
150+
| geo\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the geo-harvester repo |
151+
| geo\_stage\_build\_workflow | Full contents of the stage-build.yml for the geo-harvester repo |
147152
| geoserver\_fargate\_dev\_build\_workflow | Full contents of the dev-build.yml for the geoserver-deposits repo |
148153
| geoserver\_fargate\_makefile | Full contents of the Makefile for the geoserver-deposits repo (allows devs to push to Dev account only) |
149154
| geoserver\_fargate\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the geoserver-deposits repo |

timdex_ecrs.tf

Lines changed: 99 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ output "tim_prod_promote_workflow" {
247247

248248
## browsertrix-harvester
249249
# browsertrix-harvester ECR repository
250-
module "ecr_timdex_broswertrix" {
250+
module "ecr_timdex_browsertrix" {
251251
source = "./modules/ecr"
252252
repo_name = "browsertrix-harvester"
253253
login_policy_arn = aws_iam_policy.login.arn
@@ -258,47 +258,131 @@ module "ecr_timdex_broswertrix" {
258258
app-repo = "timdex-infrastructure-browsertrix"
259259
}
260260
}
261+
# NEED TO FIX THE MISSPELLING!!!
262+
moved {
263+
from = module.ecr_timdex_broswertrix
264+
to = module.ecr_timdex_browsertrix
265+
}
261266
# Outputs in dev
262-
output "broswertrix_dev_build_workflow" {
267+
output "browsertrix_dev_build_workflow" {
263268
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/dev-build.tpl", {
264269
region = var.aws_region
265-
role = module.ecr_timdex_broswertrix.gha_role
266-
ecr = module.ecr_timdex_broswertrix.repository_name
270+
role = module.ecr_timdex_browsertrix.gha_role
271+
ecr = module.ecr_timdex_browsertrix.repository_name
267272
function = ""
268273
}
269274
)
270275
description = "Full contents of the dev-build.yml for the browsertrix-harvester repo"
271276
}
272-
output "broswertrix_makefile" {
277+
# NEED TO FIX THE MISSPELLING!!!
278+
moved {
279+
from = output.broswertrix_dev_build_workflow
280+
to = output.browsertrix_dev_build_workflow
281+
}
282+
output "browsertrix_makefile" {
273283
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/makefile.tpl", {
274-
ecr_name = module.ecr_timdex_broswertrix.repository_name
275-
ecr_url = module.ecr_timdex_broswertrix.repository_url
284+
ecr_name = module.ecr_timdex_browsertrix.repository_name
285+
ecr_url = module.ecr_timdex_browsertrix.repository_url
276286
function = ""
277287
}
278288
)
279289
description = "Full contents of the Makefile for the browsertrix-harvester repo (allows devs to push to Dev account only)"
280290
}
291+
# NEED TO FIX THE MISSPELLING!!!
292+
moved {
293+
from = output.broswertrix_makefile
294+
to = output.browsertrix_makefile
295+
}
281296
# Outputs in stage
282-
output "broswertrix_stage_build_workflow" {
297+
output "browsertrix_stage_build_workflow" {
283298
value = var.environment == "prod" || var.environment == "dev" ? null : templatefile("${path.module}/files/stage-build.tpl", {
284299
region = var.aws_region
285-
role = module.ecr_timdex_broswertrix.gha_role
286-
ecr = module.ecr_timdex_broswertrix.repository_name
300+
role = module.ecr_timdex_browsertrix.gha_role
301+
ecr = module.ecr_timdex_browsertrix.repository_name
287302
function = ""
288303
}
289304
)
290305
description = "Full contents of the stage-build.yml for the browsertrix-harvester repo"
291306
}
307+
# NEED TO FIX THE MISSPELLING!!!
308+
moved {
309+
from = output.broswertrix_stage_build_workflow
310+
to = output.browsertrix_stage_build_workflow
311+
}
292312
# Outputs after promotion to prod
293-
output "broswertrix_prod_promote_workflow" {
313+
output "browsertrix_prod_promote_workflow" {
294314
value = var.environment == "stage" || var.environment == "dev" ? null : templatefile("${path.module}/files/prod-promote.tpl", {
295315
region = var.aws_region
296-
role_stage = "${module.ecr_timdex_broswertrix.repo_name}-gha-stage"
297-
role_prod = "${module.ecr_timdex_broswertrix.repo_name}-gha-prod"
298-
ecr_stage = "${module.ecr_timdex_broswertrix.repo_name}-stage"
299-
ecr_prod = "${module.ecr_timdex_broswertrix.repo_name}-prod"
316+
role_stage = "${module.ecr_timdex_browsertrix.repo_name}-gha-stage"
317+
role_prod = "${module.ecr_timdex_browsertrix.repo_name}-gha-prod"
318+
ecr_stage = "${module.ecr_timdex_browsertrix.repo_name}-stage"
319+
ecr_prod = "${module.ecr_timdex_browsertrix.repo_name}-prod"
300320
function = ""
301321
}
302322
)
303323
description = "Full contents of the prod-promote.yml for the browsertrix-harvester repo"
304324
}
325+
# NEED TO FIX THE MISSPELLING!!!
326+
moved {
327+
from = output.broswertrix_prod_promote_workflow
328+
to = output.browsertrix_prod_promote_workflow
329+
}
330+
331+
332+
## geo-harvester
333+
# geo-harvester ECR repository
334+
module "ecr_timdex_geo" {
335+
source = "./modules/ecr"
336+
repo_name = "geo-harvester"
337+
login_policy_arn = aws_iam_policy.login.arn
338+
oidc_arn = data.aws_ssm_parameter.oidc_arn.value
339+
environment = var.environment
340+
tfoutput_ssm_path = var.tfoutput_ssm_path
341+
tags = {
342+
app-repo = "timdex-infrastructure-geo"
343+
}
344+
}
345+
# Outputs in dev
346+
output "geo_dev_build_workflow" {
347+
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/dev-build.tpl", {
348+
region = var.aws_region
349+
role = module.ecr_timdex_geo.gha_role
350+
ecr = module.ecr_timdex_geo.repository_name
351+
function = ""
352+
}
353+
)
354+
description = "Full contents of the dev-build.yml for the geo-harvester repo"
355+
}
356+
output "geo_makefile" {
357+
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/makefile.tpl", {
358+
ecr_name = module.ecr_timdex_geo.repository_name
359+
ecr_url = module.ecr_timdex_geo.repository_url
360+
function = ""
361+
}
362+
)
363+
description = "Full contents of the Makefile for the geo-harvester repo (allows devs to push to Dev account only)"
364+
}
365+
# Outputs in stage
366+
output "geo_stage_build_workflow" {
367+
value = var.environment == "prod" || var.environment == "dev" ? null : templatefile("${path.module}/files/stage-build.tpl", {
368+
region = var.aws_region
369+
role = module.ecr_timdex_geo.gha_role
370+
ecr = module.ecr_timdex_geo.repository_name
371+
function = ""
372+
}
373+
)
374+
description = "Full contents of the stage-build.yml for the geo-harvester repo"
375+
}
376+
# Outputs after promotion to prod
377+
output "geo_prod_promote_workflow" {
378+
value = var.environment == "stage" || var.environment == "dev" ? null : templatefile("${path.module}/files/prod-promote.tpl", {
379+
region = var.aws_region
380+
role_stage = "${module.ecr_timdex_geo.repo_name}-gha-stage"
381+
role_prod = "${module.ecr_timdex_geo.repo_name}-gha-prod"
382+
ecr_stage = "${module.ecr_timdex_geo.repo_name}-stage"
383+
ecr_prod = "${module.ecr_timdex_geo.repo_name}-prod"
384+
function = ""
385+
}
386+
)
387+
description = "Full contents of the prod-promote.yml for the geo-harvester repo"
388+
}

0 commit comments

Comments
 (0)