Skip to content

Commit 81d071d

Browse files
committed
clean up
1 parent cabd805 commit 81d071d

6 files changed

Lines changed: 10 additions & 12 deletions

File tree

examples/braintrust-data-plane-private/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ domain.
77
Create the DNS record outside the module, pointing `custom_domain` at the API
88
ECS ALB. Create an ACM certificate outside the module that covers
99
`custom_domain`, then pass it as `custom_certificate_arn`.
10-

examples/braintrust-data-plane-private/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ module "braintrust-data-plane" {
5959
brainstore_writer_instance_type = "c8gd.8xlarge"
6060

6161
### Redis configuration
62-
redis_instance_type = "cache.t4g.medium"
63-
redis_version = "7.0"
62+
63+
# Default is acceptable for typical production deployments.
64+
redis_instance_type = "cache.r7g.large"
65+
66+
redis_version = "7.0"
6467

6568
### Network configuration
6669
# WARNING: Choose these CIDR blocks carefully with your networking team.

main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ locals {
4343
enable_ecs_api = local.create_ecs_api && (var.enable_ecs_api || var.use_deployment_mode_private_api_ecs)
4444
# Lambda services are skipped for external EKS and private API ECS deployments.
4545
create_lambda_services = !var.use_deployment_mode_external_eks && !var.use_deployment_mode_private_api_ecs
46-
# The ingress module is only needed when Lambda services own the public API path.
47-
create_ingress = local.create_lambda_services
4846
# Brainstore reads the ECS API URL when ECS owns API/proxy behavior, otherwise the Lambda proxy URL.
4947
brainstore_ai_proxy_url_ssm_parameter_name = local.enable_ecs_api ? local.api_ecs_url_ssm_parameter_name : local.ai_proxy_url_ssm_parameter_name
5048
# api_url points at the active data-plane endpoint for the selected deployment mode.
@@ -393,7 +391,7 @@ module "api_ecs" {
393391

394392
module "ingress" {
395393
source = "./modules/ingress"
396-
count = local.create_ingress ? 1 : 0
394+
count = local.create_lambda_services ? 1 : 0
397395

398396
deployment_name = var.deployment_name
399397
custom_domain = var.custom_domain

modules/api-ecs/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ locals {
88

99
using_brainstore_writer = var.brainstore_writer_hostname != null && var.brainstore_writer_hostname != ""
1010
using_brainstore_fast_reader = var.brainstore_fast_reader_hostname != null && var.brainstore_fast_reader_hostname != ""
11-
https_url = var.private_api_ecs_mode ? "https://${var.fqdn}" : null
1211

1312
base_env_vars = merge({
1413
ORG_NAME = var.braintrust_org_name
@@ -556,7 +555,6 @@ resource "aws_ecs_service" "api_ecs" {
556555
}
557556

558557
depends_on = [
559-
aws_lb_listener.api_ecs_https,
560558
aws_lb_listener.api_ecs_brainstore_http,
561559
]
562560

modules/api-ecs/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ output "task_security_group_id" {
3535

3636
output "client_url" {
3737
description = "URL clients should use for the API ECS ALB. Null unless private API ECS mode is enabled."
38-
value = local.https_url
38+
value = var.private_api_ecs_mode ? "https://${var.fqdn}" : null
3939
}
4040

4141
output "fqdn" {

outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,17 @@ output "api_url" {
169169
}
170170

171171
output "cloudfront_distribution_domain_name" {
172-
value = local.create_ingress ? module.ingress[0].cloudfront_distribution_domain_name : null
172+
value = local.create_lambda_services ? module.ingress[0].cloudfront_distribution_domain_name : null
173173
description = "The domain name of the cloudfront distribution"
174174
}
175175

176176
output "cloudfront_distribution_arn" {
177-
value = local.create_ingress ? module.ingress[0].cloudfront_distribution_arn : null
177+
value = local.create_lambda_services ? module.ingress[0].cloudfront_distribution_arn : null
178178
description = "The ARN of the cloudfront distribution"
179179
}
180180

181181
output "cloudfront_distribution_hosted_zone_id" {
182-
value = local.create_ingress ? module.ingress[0].cloudfront_distribution_hosted_zone_id : null
182+
value = local.create_lambda_services ? module.ingress[0].cloudfront_distribution_hosted_zone_id : null
183183
description = "The hosted zone ID of the cloudfront distribution"
184184
}
185185

0 commit comments

Comments
 (0)