Skip to content

Commit

Permalink
Add optional path var for instance level bucket path
Browse files Browse the repository at this point in the history
  • Loading branch information
levinandrew committed Jul 31, 2024
1 parent 9626c48 commit 79f8d8f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ Upgrades must be executed in step-wise fashion from one version to the next. You
| <a name="input_aws_loadbalancer_controller_tags"></a> [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 |
| <a name="input_bucket_kms_key_arn"></a> [bucket\_kms\_key\_arn](#input\_bucket\_kms\_key\_arn) | n/a | `string` | `""` | no |
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | n/a | `string` | `""` | no |
| <a name="input_bucket_path"></a> [bucket\_path](#input\_bucket\_path) | path of where to store data for the instance-level bucket | `string` | `""` | no |
| <a name="input_create_bucket"></a> [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 |
| <a name="input_create_elasticache"></a> [create\_elasticache](#input\_create\_elasticache) | Boolean indicating whether to provision an elasticache instance (true) or not (false). | `bool` | `true` | no |
| <a name="input_create_vpc"></a> [create\_vpc](#input\_create\_vpc) | Boolean indicating whether to deploy a VPC (true) or not (false). | `bool` | `true` | no |
Expand Down
1 change: 1 addition & 0 deletions examples/public-dns-external/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,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
Expand Down
5 changes: 5 additions & 0 deletions examples/public-dns-external/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
##########################################
Expand Down

0 comments on commit 79f8d8f

Please sign in to comment.