diff --git a/README.md b/README.md
index c379e37d..50f59300 100644
--- a/README.md
+++ b/README.md
@@ -163,6 +163,7 @@ Upgrades must be executed in step-wise fashion from one version to the next. You
| [aws\_loadbalancer\_controller\_tags](#input\_aws\_loadbalancer\_controller\_tags) | (Optional) A map of AWS tags to apply to all resources managed by the load balancer controller | `map(string)` | `{}` | no |
| [bucket\_kms\_key\_arn](#input\_bucket\_kms\_key\_arn) | n/a | `string` | `""` | no |
| [bucket\_name](#input\_bucket\_name) | n/a | `string` | `""` | no |
+| [bucket\_path](#input\_bucket\_path) | path of where to store data for the instance-level bucket | `string` | `""` | no |
| [create\_bucket](#input\_create\_bucket) | ######################################### External Bucket # ######################################### Most users will not need these settings. They are ment for users who want a bucket and sqs that are in a different account. | `bool` | `true` | no |
| [create\_elasticache](#input\_create\_elasticache) | Boolean indicating whether to provision an elasticache instance (true) or not (false). | `bool` | `true` | no |
| [create\_vpc](#input\_create\_vpc) | Boolean indicating whether to deploy a VPC (true) or not (false). | `bool` | `true` | no |
@@ -233,6 +234,7 @@ Upgrades must be executed in step-wise fashion from one version to the next. You
| Name | Description |
|------|-------------|
| [bucket\_name](#output\_bucket\_name) | n/a |
+| [bucket\_path](#output\_bucket\_path) | n/a |
| [bucket\_queue\_name](#output\_bucket\_queue\_name) | n/a |
| [bucket\_region](#output\_bucket\_region) | n/a |
| [cluster\_id](#output\_cluster\_id) | n/a |
diff --git a/examples/public-dns-external/main.tf b/examples/public-dns-external/main.tf
index 0e08a056..04eeda8d 100644
--- a/examples/public-dns-external/main.tf
+++ b/examples/public-dns-external/main.tf
@@ -39,6 +39,7 @@ module "wandb_infra" {
license = var.wandb_license
bucket_name = var.bucket_name
+ bucket_path = var.bucket_path
bucket_kms_key_arn = var.bucket_kms_key_arn
use_internal_queue = true
size = var.size
@@ -91,6 +92,7 @@ module "wandb_app" {
host = module.wandb_infra.url
bucket = "s3://${module.wandb_infra.bucket_name}"
+ bucket_path = var.bucket_path
bucket_aws_region = module.wandb_infra.bucket_region
bucket_queue = "internal://"
bucket_kms_key_arn = module.wandb_infra.kms_key_arn
@@ -115,6 +117,10 @@ output "bucket_name" {
value = module.wandb_infra.bucket_name
}
+output "bucket_path" {
+ value = module.wandb_infra.bucket_path
+}
+
output "bucket_queue_name" {
value = module.wandb_infra.bucket_queue_name
}
diff --git a/examples/public-dns-external/variables.tf b/examples/public-dns-external/variables.tf
index 64ecbede..b167af77 100644
--- a/examples/public-dns-external/variables.tf
+++ b/examples/public-dns-external/variables.tf
@@ -77,6 +77,11 @@ variable "bucket_kms_key_arn" {
default = ""
}
+variable "bucket_path" {
+ description = "path of where to store data for the instance-level bucket"
+ type = string
+ default = ""
+}
variable "allowed_inbound_cidr" {
default = ["0.0.0.0/0"]
diff --git a/main.tf b/main.tf
index 0e5f86ab..ebbd8e28 100644
--- a/main.tf
+++ b/main.tf
@@ -278,6 +278,7 @@ module "wandb" {
bucket = {
provider = "s3"
name = local.bucket_name
+ path = var.bucket_path
region = data.aws_s3_bucket.file_storage.region
kmsKey = local.s3_kms_key_arn
}
diff --git a/outputs.tf b/outputs.tf
index aa7d22cd..04d1c6af 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -1,12 +1,16 @@
output "bucket_name" {
value = local.bucket_name
}
+output "bucket_path" {
+ value = var.bucket_path
+}
output "bucket_queue_name" {
value = local.bucket_queue_name
}
output "bucket_region" {
value = data.aws_s3_bucket.file_storage.region
}
+
output "cluster_id" {
value = module.app_eks.cluster_id
}
diff --git a/variables.tf b/variables.tf
index 09de8e77..cd152ab3 100644
--- a/variables.tf
+++ b/variables.tf
@@ -429,6 +429,18 @@ variable "bucket_kms_key_arn" {
}
}
+##########################################
+# Bucket path #
+##########################################
+# This setting is meant for users who want to store all of their instance-level
+# bucket's data at a specific path within their bucket. It can be set both for
+# external buckets or the bucket created by this module.
+variable "bucket_path" {
+ description = "path of where to store data for the instance-level bucket"
+ type = string
+ default = ""
+}
+
##########################################
# Redis #
##########################################