Page MenuHomePhabricator

D8714.diff
No OneTemporary

D8714.diff

diff --git a/services/terraform/modules/shared/s3.tf b/services/terraform/modules/shared/s3.tf
--- a/services/terraform/modules/shared/s3.tf
+++ b/services/terraform/modules/shared/s3.tf
@@ -7,5 +7,5 @@
resource "aws_s3_bucket" "comm_buckets" {
count = length(var.s3_bucket_names)
- bucket = var.s3_bucket_names[count.index]
+ bucket = "${var.s3_bucket_names[count.index]}${var.bucket_name_suffix}"
}
diff --git a/services/terraform/modules/shared/variables.tf b/services/terraform/modules/shared/variables.tf
--- a/services/terraform/modules/shared/variables.tf
+++ b/services/terraform/modules/shared/variables.tf
@@ -2,3 +2,9 @@
type = bool
default = false
}
+
+variable "bucket_name_suffix" {
+ type = string
+ default = ""
+ description = "Suffix added to all bucket names"
+}
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
@@ -43,6 +43,7 @@
# Shared resources between local dev environment and remote AWS
module "shared" {
- source = "../modules/shared"
+ source = "../modules/shared"
+ bucket_name_suffix = local.is_staging ? "-staging" : ""
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 3:44 PM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597411
Default Alt Text
D8714.diff (1 KB)

Event Timeline