Skip to content

Commit e76faee

Browse files
authored
Fix additional_kms_key_policies validation check (#43)
* Fix validation error with additional kms policies * Examples variables update
1 parent 37150bc commit e76faee

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

examples/braintrust-data-plane/main.tf

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ module "braintrust-data-plane" {
3434
# PostgreSQL engine version for the RDS instance.
3535
# postgres_version = "15.7"
3636

37+
# Multi-AZ RDS instance. Enabling increases cost but provides higher availability. Recommended for production environments.
38+
# postgres_multi_az = true
39+
3740
### Brainstore configuration
3841
# Enable Brainstore for faster analytics
3942
enable_brainstore = false
@@ -59,10 +62,10 @@ module "braintrust-data-plane" {
5962
### Network configuration
6063
# CIDR block for the VPC. You might need to adjust this so it does not conflict with any
6164
# other VPC CIDR blocks you intend to peer with Braintrust
62-
# vpc_cidr = "10.175.0.0/16"
65+
# vpc_cidr = "10.175.0.0/21"
6366

6467
# CIDR block for the Quarantined VPC. This is used to run user defined functions in an isolated environment.
65-
# quarantine_vpc_cidr = "10.176.0.0/16"
68+
# quarantine_vpc_cidr = "10.175.8.0/21"
6669

6770
### Advanced configuration
6871
# The number API Handler instances to provision and keep alive. This reduces cold start times and improves latency, with some increase in cost.
@@ -83,11 +86,4 @@ module "braintrust-data-plane" {
8386
# The time frame in minutes over which rate per-user rate limits are accumulated
8487
# outbound_rate_limit_window_minutes = 1
8588

86-
# Existing KMS key ARN to use for encrypting resources. If not provided, a new key will be created.
87-
# DO NOT change this after deployment. If you do it will attempt to destroy your DB and prior S3 objects will no longer be readable.
88-
# kms_key_arn = null
89-
90-
# Enable the Quarantine VPC to run user defined functions in an isolated environment. If disabled, user defined functions will not be available.
91-
# enable_quarantine_vpc = true
92-
9389
}

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ variable "additional_kms_key_policies" {
4242
type = list(any)
4343
default = []
4444
validation {
45-
condition = length(var.additional_kms_key_policies) == 0 || var.kms_key_arn == null
46-
error_message = "additional_kms_key_policies can only be used if kms_key_arn is not provided."
45+
condition = length(var.additional_kms_key_policies) == 0 || var.kms_key_arn == ""
46+
error_message = "additional_kms_key_policies can only be used with a generated KMS key"
4747
}
4848
}
4949

0 commit comments

Comments
 (0)