Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion deploy/aws-ecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ These templates assume you need to create a VPC, ECS cluster, and security group

### Secrets

`secret_key_base` should be a random string of at least 32 characters.
`secret_key_base` should be a random string of **exactly** 64 characters.

`vault_key` should be a random base64 encoded string of **exactly** 32 characters.

You can generate these secrets with `openssl` like so:

```bash
# Generate SECRET_KEY_BASE
openssl rand -base64 64

# Generate VAULT_KEY
openssl rand -base64 32
```
10 changes: 10 additions & 0 deletions deploy/aws-ecs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,22 @@ variable "secret_key_base" {
description = "The secret key base for Sequin (will be stored in SSM Parameter Store)"
type = string
sensitive = true

validation {
condition = length(var.secret_key_base) == 64
error_message = "secret_key_base must be exactly 64 characters long."
}
}

variable "vault_key" {
description = "The vault key for Sequin (will be stored in SSM Parameter Store)"
type = string
sensitive = true

validation {
condition = length(var.vault_key) == 32
error_message = "vault_key must be exactly 32 characters long."
}
}

data "aws_availability_zones" "available" {}
Loading