@@ -365,3 +365,68 @@ output "geo_prod_promote_workflow" {
365365 )
366366 description = " Full contents of the prod-promote.yml for the geo-harvester repo"
367367}
368+
369+
370+ # timdex-embeddings containers
371+ # This is a standard ECR for an ECS with a Fargate launch type
372+ module "ecr_timdex_embeddings" {
373+ source = " ./modules/ecr"
374+ repo_name = " timdex-embeddings"
375+ login_policy_arn = aws_iam_policy. login . arn
376+ oidc_arn = data. aws_ssm_parameter . oidc_arn . value
377+ environment = var. environment
378+ tfoutput_ssm_path = var. tfoutput_ssm_path
379+ tags = {
380+ app-repo = " timdex-infrastructure-timdex-embeddings"
381+ }
382+ }
383+
384+ # # Outputs to Terraform Cloud for devs ##
385+
386+ # # For timdex-embeddings application repo and ECR repository
387+ # Outputs in dev
388+ output "timdex_embeddings_fargate_dev_build_workflow" {
389+ value = var. environment == " prod" || var. environment == " stage" ? null : templatefile (" ${ path . module } /files/dev-build-cpu-arch.tpl" , {
390+ region = var.aws_region
391+ role = module.ecr_timdex_embeddings.gha_role
392+ ecr = module.ecr_timdex_embeddings.repository_name
393+ function = " "
394+ }
395+ )
396+ description = " Full contents of the dev-build.yml for the timdex-embeddings repo"
397+ }
398+ output "timdex_embeddings_fargate_makefile" {
399+ value = var. environment == " prod" || var. environment == " stage" ? null : templatefile (" ${ path . module } /files/makefile-cpu-arch.tpl" , {
400+ ecr_name = module.ecr_timdex_embeddings.repository_name
401+ ecr_url = module.ecr_timdex_embeddings.repository_url
402+ function = " "
403+ }
404+ )
405+ description = " Full contents of the Makefile for the timdex-embeddings repo (allows devs to push to Dev account only)"
406+ }
407+
408+ # Outputs in stage
409+ output "timdex_embeddings_fargate_stage_build_workflow" {
410+ value = var. environment == " prod" || var. environment == " dev" ? null : templatefile (" ${ path . module } /files/stage-build-cpu-arch.tpl" , {
411+ region = var.aws_region
412+ role = module.ecr_timdex_embeddings.gha_role
413+ ecr = module.ecr_timdex_embeddings.repository_name
414+ function = " "
415+ }
416+ )
417+ description = " Full contents of the stage-build.yml for the timdex-embeddings repo"
418+ }
419+
420+ # Outputs after promotion to prod
421+ output "timdex_embeddings_fargate_prod_promote_workflow" {
422+ value = var. environment == " stage" || var. environment == " dev" ? null : templatefile (" ${ path . module } /files/prod-promote-cpu-arch.tpl" , {
423+ region = var.aws_region
424+ role_stage = " ${ module . ecr_timdex_embeddings . repo_name } -gha-stage"
425+ role_prod = " ${ module . ecr_timdex_embeddings . repo_name } -gha-prod"
426+ ecr_stage = " ${ module . ecr_timdex_embeddings . repo_name } -stage"
427+ ecr_prod = " ${ module . ecr_timdex_embeddings . repo_name } -prod"
428+ function = " "
429+ }
430+ )
431+ description = " Full contents of the prod-promote.yml for the timdex-embeddings repo"
432+ }
0 commit comments