Skip to content

Commit 7ebe3d9

Browse files
committed
Add ECR for Geo-Harvester
Why these changes are being introduced: A new geo-harvester function is being written for the GDT project to add geographic and geospatial data to TIMDEX. This creates the ECR repo in AWS to hold the built containers. How this addresses that need: * Add a new ECR to the set of TIMDEX ECRs called geo-harvester * Update README Side effects of this change: None. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/GDT-38
1 parent 1f8a1cc commit 7ebe3d9

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ then replace all the ssm parameter references for `oidc_arn` with `aws_iam_openi
8989
| ecr\_sapinvoices | ./modules/ecr | n/a |
9090
| ecr\_slingshot | ./modules/ecr | n/a |
9191
| ecr\_timdex\_broswertrix | ./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 |
@@ -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: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,62 @@ output "broswertrix_prod_promote_workflow" {
302302
)
303303
description = "Full contents of the prod-promote.yml for the browsertrix-harvester repo"
304304
}
305+
306+
307+
## geo-harvester
308+
# geo-harvester ECR repository
309+
module "ecr_timdex_geo" {
310+
source = "./modules/ecr"
311+
repo_name = "geo-harvester"
312+
login_policy_arn = aws_iam_policy.login.arn
313+
oidc_arn = data.aws_ssm_parameter.oidc_arn.value
314+
environment = var.environment
315+
tfoutput_ssm_path = var.tfoutput_ssm_path
316+
tags = {
317+
app-repo = "timdex-infrastructure-geo"
318+
}
319+
}
320+
# Outputs in dev
321+
output "geo_dev_build_workflow" {
322+
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/dev-build.tpl", {
323+
region = var.aws_region
324+
role = module.ecr_timdex_geo.gha_role
325+
ecr = module.ecr_timdex_geo.repository_name
326+
function = ""
327+
}
328+
)
329+
description = "Full contents of the dev-build.yml for the geo-harvester repo"
330+
}
331+
output "geo_makefile" {
332+
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/makefile.tpl", {
333+
ecr_name = module.ecr_timdex_geo.repository_name
334+
ecr_url = module.ecr_timdex_geo.repository_url
335+
function = ""
336+
}
337+
)
338+
description = "Full contents of the Makefile for the geo-harvester repo (allows devs to push to Dev account only)"
339+
}
340+
# Outputs in stage
341+
output "geo_stage_build_workflow" {
342+
value = var.environment == "prod" || var.environment == "dev" ? null : templatefile("${path.module}/files/stage-build.tpl", {
343+
region = var.aws_region
344+
role = module.ecr_timdex_geo.gha_role
345+
ecr = module.ecr_timdex_geo.repository_name
346+
function = ""
347+
}
348+
)
349+
description = "Full contents of the stage-build.yml for the geo-harvester repo"
350+
}
351+
# Outputs after promotion to prod
352+
output "geo_prod_promote_workflow" {
353+
value = var.environment == "stage" || var.environment == "dev" ? null : templatefile("${path.module}/files/prod-promote.tpl", {
354+
region = var.aws_region
355+
role_stage = "${module.ecr_timdex_geo.repo_name}-gha-stage"
356+
role_prod = "${module.ecr_timdex_geo.repo_name}-gha-prod"
357+
ecr_stage = "${module.ecr_timdex_geo.repo_name}-stage"
358+
ecr_prod = "${module.ecr_timdex_geo.repo_name}-prod"
359+
function = ""
360+
}
361+
)
362+
description = "Full contents of the prod-promote.yml for the geo-harvester repo"
363+
}

0 commit comments

Comments
 (0)