diff --git a/examples/byo-vpc-eks-sql-redis/main.tf b/examples/byo-vpc-eks-sql-redis/main.tf index ca4a1b83..b949b90c 100644 --- a/examples/byo-vpc-eks-sql-redis/main.tf +++ b/examples/byo-vpc-eks-sql-redis/main.tf @@ -174,12 +174,12 @@ module "wandb" { extraEnv = var.other_wandb_env - bucket = var.create_bucket ? null : { + bucket = var.bucket_name != "" ? { provider = "s3" name = var.bucket_name region = data.aws_s3_bucket.file_storage.region kmsKey = var.bucket_kms_key_arn - } + } : null defaultBucket = { provider = "s3" name = module.file_storage.bucket_name diff --git a/examples/byo-vpc-sql/main.tf b/examples/byo-vpc-sql/main.tf index 35cdaa06..42ccb5fc 100644 --- a/examples/byo-vpc-sql/main.tf +++ b/examples/byo-vpc-sql/main.tf @@ -165,7 +165,7 @@ module "app_eks" { map_users = var.kubernetes_map_users bucket_kms_key_arns = local.use_external_bucket ? var.bucket_kms_key_arn : local.kms_key_arn - bucket_arn = var.create_bucket ? module.file_storage.bucket_arn : data.aws_s3_bucket.file_storage.arn + bucket_arn = var.bucket_name == "" ? module.file_storage.bucket_arn : data.aws_s3_bucket.file_storage.arn bucket_sqs_queue_arn = local.use_internal_queue ? null : data.aws_sqs_queue.file_storage.0.arn network_id = local.network_id @@ -279,12 +279,12 @@ module "wandb" { extraEnv = var.other_wandb_env - bucket = var.create_bucket ? null : { + bucket = var.bucket_name != "" ? { provider = "s3" name = var.bucket_name region = data.aws_s3_bucket.file_storage.region kmsKey = var.bucket_kms_key_arn - } + } : null defaultBucket = { provider = "s3" diff --git a/main.tf b/main.tf index 2668b6b6..07816b76 100644 --- a/main.tf +++ b/main.tf @@ -269,13 +269,13 @@ module "wandb" { cloudProvider = "aws" extraEnv = var.other_wandb_env - bucket = var.create_bucket ? null : { + bucket = var.bucket_name != "" ? { provider = "s3" name = var.bucket_name path = var.bucket_path region = data.aws_s3_bucket.file_storage.region kmsKey = var.bucket_kms_key_arn - } + } : null defaultBucket = { provider = "s3" name = module.file_storage.bucket_name