Repository navigation
BB2-4910: Initial work to add terraform code in BB for ECS service, t… - #1766
JamesDemeryNava wants to merge 13 commits into
Conversation
There was a problem hiding this comment.
Is it okay to create a separate file for the its-log ECS service, as I do not want all the env vars that the bb-api service has, and the task definition is a bit different?
I think this makes sense!
There was a problem hiding this comment.
When I ran tofu plan in the 20-microservices directory, I see 28 resources to create and 1 to destroy which is: # aws_ecs_task_definition.ecs_task["api"] must be replaced. That seems incorrect, but I'm not sure how my change is introducing that. Any thoughts there?
I think this is because the terraform state gets out of sync with the updates made by GitHub actions to the task definition. The task definition resource can't be updated in place (I don't remember why) and so will be deleted and then re-added. This seems okay to me.
|
Validation steps look good on a quick pass. |
| resource "aws_ecs_task_definition" "its_log" { | ||
| family = "${local.app_prefix}-${local.workspace}-its-log-family" | ||
|
|
||
| container_definitions = jsonencode([{ |
There was a problem hiding this comment.
Will also want to add Datadog to this!
There was a problem hiding this comment.
I believe i've added it now, let me know if you see any issues
…ask def, EFS, and s3 sync to BCDA s3 bucket
JIRA Ticket:
BB2-4910
What Does This PR Do?
This PR adds terraform code to create an ECS service, task definition, EFS, and a scheduled task to run an s3 sync between the new EFS and an s3 bucket in BCDA's AWS account. The ECS service references an ECR repository that is going to be created in a cdap PR, which is here.
The overall goal for this architecture is shown in the image below, though I still need to add the cloudwatch logs to this diagram:
This PR is in a weird spot, as there is another ticket to actually deploy it (BB2-5184). Also, there is the cdap PR that needs to be merged first, and then we need to send the ARN for the s3 sync task role over to the cdap team (or work with them) to add the write permissions for that task role to the bucket where our metrics CSVs will live.
What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
Validation
What Security Implications Does This PR Have?
Please indicate if this PR does any of the following:
security engineer's approval. @sb-DarenDean @sb-benohe we'll be adding a decent amount of infrastructure to our AWS accounts, so want to make sure you're aware.
Any Migrations?
etc)