[terraform][blob] Use different S3 bucket for staging
Summary:
Modified the blob service ECS task to:
- Use the "latest" tag for staging Docker image
- Add BLOB_S3_BUCKET_NAME environment variable to the task definition that uses the bucket name suffix introduced in D8714
Test Plan:
Ran terraform plan in staging:
# aws_ecs_task_definition.blob_service must be replaced -/+ resource "aws_ecs_task_definition" "blob_service" { ~ container_definitions = jsonencode( ~ [ ~ { - cpu = 0 ~ environment = [ + { + name = "BLOB_S3_BUCKET_NAME" + value = "commapp-blob-staging" }, { name = "RUST_LOG" value = "info" }, ] ~ image = "commapp/blob-server:0.2.0" -> "commapp/blob-server:latest" name = "blob-service-server" # (2 unchanged attributes hidden) }, ] # forces replacement ) ~ id = "blob-service-task-def" -> (known after apply) ~ revision = 1 -> (known after apply) # (9 unchanged attributes hidden) }
To be done after other terraform diffs in this stack are applied:
- Build docker image for staging (with "latest" tag), with D8742 applied
- Apply this TF change to redeploy blob service
- Look at ECS task logs - there should be a note: INFO blob::config: Using custom S3 bucket: commapp-blob-staging
Reviewers: jon, varun
Reviewed By: jon
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8743