Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3383475
D8743.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8743.diff
View Options
diff --git a/services/terraform/remote/main.tf b/services/terraform/remote/main.tf
--- a/services/terraform/remote/main.tf
+++ b/services/terraform/remote/main.tf
@@ -41,9 +41,14 @@
}
}
+locals {
+ # S3 bucket names are globally unique so we add a suffix to staging buckets
+ s3_bucket_name_suffix = local.is_staging ? "-staging" : ""
+}
+
# Shared resources between local dev environment and remote AWS
module "shared" {
source = "../modules/shared"
- bucket_name_suffix = local.is_staging ? "-staging" : ""
+ bucket_name_suffix = local.s3_bucket_name_suffix
}
diff --git a/services/terraform/remote/service_blob.tf b/services/terraform/remote/service_blob.tf
--- a/services/terraform/remote/service_blob.tf
+++ b/services/terraform/remote/service_blob.tf
@@ -1,11 +1,12 @@
locals {
- blob_service_image_tag = "0.2.0"
+ blob_service_image_tag = local.is_staging ? "latest" : "0.2.0"
blob_service_container_name = "blob-service-server"
blob_service_server_image = "commapp/blob-server:${local.blob_service_image_tag}"
blob_service_container_http_port = 51001
blob_service_container_grpc_port = 50051
blob_service_grpc_public_port = 50053
blob_service_domain_name = "blob.${local.root_domain}"
+ blob_service_s3_bucket = "commapp-blob${local.s3_bucket_name_suffix}"
}
resource "aws_ecs_task_definition" "blob_service" {
@@ -33,6 +34,10 @@
{
name = "RUST_LOG"
value = "info"
+ },
+ {
+ name = "BLOB_S3_BUCKET_NAME",
+ value = local.blob_service_s3_bucket
}
]
logConfiguration = {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 3:57 PM (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597425
Default Alt Text
D8743.diff (1 KB)
Attached To
Mode
D8743: [terraform][blob] Use different S3 bucket for staging
Attached
Detach File
Event Timeline
Log In to Comment