Page MenuHomePhabricator

[terraform] Add reports service
ClosedPublic

Authored by bartek on Aug 30 2023, 2:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 11, 6:42 AM
Unknown Object (File)
Sun, May 26, 9:37 AM
Unknown Object (File)
Tue, May 21, 9:59 PM
Unknown Object (File)
Tue, May 21, 9:59 PM
Unknown Object (File)
Tue, May 21, 9:59 PM
Unknown Object (File)
Tue, May 21, 9:59 PM
Unknown Object (File)
Tue, May 21, 9:58 PM
Unknown Object (File)
Tue, May 21, 9:55 PM
Subscribers

Details

Summary

Added reports service to terraform. Mostly copy-paste from other services. Diff is long, a few notes here:

  • Used EC2 backend (not Fargate) because 512MB memory is too much for this service.
  • Introduced IAM role for the service. It has access to single DynamoDB table (+ ECS Exec capability for debugging).
  • E-mail config, despite being encrypted by SOPS, is stored in Secrets Manager - the reason is that ECS Task Definition config would either expose it or, if marked as sensitive, its terraform diffs would be unusable.
  • It reaches Blob service endpoint through ECS Service Connect (D9038)
  • Load balancers are standard, copy-pasted from other services

Depends on D9038, D9039

Test Plan

Tested on staging. Reports service worked E2E (sending e-mails, storing in DDB, storing in Blob service).

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 30 2023, 2:47 PM
bartek added inline comments.
services/terraform/remote/service_reports.tf
2–4

This is temporary until @ashoat comes back and creates a commapp/reports-server repository in DockerHub

LGTM (would be nice to have ENG-4548)

services/terraform/remote/service_reports.tf
144

Comment probably should be changed

This revision is now accepted and ready to land.Aug 31 2023, 7:25 AM
This revision was automatically updated to reflect the committed changes.