Fix failing example terraform (#1175)

## Description of changes

`lifecycle` blocks don't allow variables. Right now our example
deployment for AWS doesn't work. @tazarov has a fix for this and a few
other things in https://github.com/chroma-core/chroma/pull/1173 but I'd
like to get the basic fix out before the weekend.

## Test plan
local `terraform init` failed before, now works.

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
This commit is contained in:
Ben Eggers
2023-09-22 15:49:29 -07:00
committed by GitHub
parent 35991bfe87
commit 317d547d7a
3 changed files with 4 additions and 7 deletions

View File

@@ -140,6 +140,9 @@ ssh -i ./chroma-aws ubuntu@$instance_public_ip
```
### 5. Destroy your Chroma instance
You will need to change `prevent_destroy` to `false` in the `aws_ebs_volume` in `chroma.tf`.
```bash
terraform destroy -auto-approve
```

View File

@@ -111,7 +111,7 @@ resource "aws_ebs_volume" "chroma-volume" {
}
lifecycle {
prevent_destroy = var.prevent_chroma_data_volume_delete # size in GBs
prevent_destroy = true
}
}

View File

@@ -86,9 +86,3 @@ variable "chroma_data_volume_size" {
type = number
default = 20
}
variable "prevent_chroma_data_volume_delete" {
description = "Prevent the chroma data volume from being deleted when the instance is terminated"
type = bool
default = false
}