Skip to content

Commit 68599cd

Browse files
authored
Merge pull request #45 from MITLibraries/dev
Dev into stage - HRQB client
2 parents b6f377a + 4d0f220 commit 68599cd

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ then replace all the ssm parameter references for `oidc_arn` with `aws_iam_openi
7979
| ecr\_carbon | ./modules/ecr | n/a |
8080
| ecr\_creditcardslips | ./modules/ecr | n/a |
8181
| ecr\_dss | ./modules/ecr | n/a |
82+
| ecr\_hrqb\_client | ./modules/ecr | n/a |
8283
| ecr\_matomo | ./modules/ecr | n/a |
8384
| ecr\_oaiharvester | ./modules/ecr | n/a |
8485
| ecr\_patronload | ./modules/ecr | n/a |
@@ -145,6 +146,10 @@ then replace all the ssm parameter references for `oidc_arn` with `aws_iam_openi
145146
| geo\_makefile | Full contents of the Makefile for the geo-harvester repo (allows devs to push to Dev account only) |
146147
| geo\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the geo-harvester repo |
147148
| geo\_stage\_build\_workflow | Full contents of the stage-build.yml for the geo-harvester repo |
149+
| hrqb\_client\_fargate\_dev\_build\_workflow | Full contents of the dev-build.yml for the hrqb-client repo |
150+
| hrqb\_client\_fargate\_makefile | Full contents of the Makefile for the hrqb-client repo (allows devs to push to Dev account only) |
151+
| hrqb\_client\_fargate\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the hrqb-client repo |
152+
| hrqb\_client\_fargate\_stage\_build\_workflow | Full contents of the stage-build.yml for the hrqb-client repo |
148153
| matomo\_fargate\_dev\_build\_workflow | Full contents of the dev-build.yml for the matomo repo |
149154
| matomo\_fargate\_makefile | Full contents of the Makefile for the matomo repo (allows devs to push to Dev account only) |
150155
| matomo\_fargate\_prod\_promote\_workflow | Full contents of the prod-promote.yml for the matomo repo |

hrqb_loader.tf

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
# hrqb_client containers
3+
# This is a standard ECR for an ECS with a Fargate launch type
4+
locals {
5+
ecr_hrqb_client = "hrqb-client-${var.environment}"
6+
}
7+
module "ecr_hrqb_client" {
8+
source = "./modules/ecr"
9+
repo_name = "hrqb-client"
10+
login_policy_arn = aws_iam_policy.login.arn
11+
oidc_arn = data.aws_ssm_parameter.oidc_arn.value
12+
environment = var.environment
13+
tfoutput_ssm_path = var.tfoutput_ssm_path
14+
tags = {
15+
app-repo = "hrqb-client"
16+
}
17+
}
18+
19+
## Outputs to Terraform Cloud for devs ##
20+
21+
## For hrqb_client application repo and ECR repository
22+
# Outputs in dev
23+
output "hrqb_client_fargate_dev_build_workflow" {
24+
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/dev-build.tpl", {
25+
region = var.aws_region
26+
role = module.ecr_hrqb_client.gha_role
27+
ecr = module.ecr_hrqb_client.repository_name
28+
function = ""
29+
}
30+
)
31+
description = "Full contents of the dev-build.yml for the hrqb-client repo"
32+
}
33+
output "hrqb_client_fargate_makefile" {
34+
value = var.environment == "prod" || var.environment == "stage" ? null : templatefile("${path.module}/files/makefile.tpl", {
35+
ecr_name = module.ecr_hrqb_client.repository_name
36+
ecr_url = module.ecr_hrqb_client.repository_url
37+
function = ""
38+
}
39+
)
40+
description = "Full contents of the Makefile for the hrqb-client repo (allows devs to push to Dev account only)"
41+
}
42+
43+
# Outputs in stage
44+
output "hrqb_client_fargate_stage_build_workflow" {
45+
value = var.environment == "prod" || var.environment == "dev" ? null : templatefile("${path.module}/files/stage-build.tpl", {
46+
region = var.aws_region
47+
role = module.ecr_hrqb_client.gha_role
48+
ecr = module.ecr_hrqb_client.repository_name
49+
function = ""
50+
}
51+
)
52+
description = "Full contents of the stage-build.yml for the hrqb-client repo"
53+
}
54+
55+
# Outputs after promotion to prod
56+
output "hrqb_client_fargate_prod_promote_workflow" {
57+
value = var.environment == "stage" || var.environment == "dev" ? null : templatefile("${path.module}/files/prod-promote.tpl", {
58+
region = var.aws_region
59+
role_stage = "${module.ecr_hrqb_client.repo_name}-gha-stage"
60+
role_prod = "${module.ecr_hrqb_client.repo_name}-gha-prod"
61+
ecr_stage = "${module.ecr_hrqb_client.repo_name}-stage"
62+
ecr_prod = "${module.ecr_hrqb_client.repo_name}-prod"
63+
function = ""
64+
}
65+
)
66+
description = "Full contents of the prod-promote.yml for the hrqb-client repo"
67+
}

0 commit comments

Comments
 (0)