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
10 changes: 10 additions & 0 deletions infra/terraform/envs/production/app-deps.tf
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,14 @@ resource "aws_secretsmanager_secret" "app" {
resource "aws_secretsmanager_secret_version" "app" {
secret_id = aws_secretsmanager_secret.app.id
secret_string = jsonencode(local.app_secret_values)

# Terraform only *seeds* this secret on first creation. Runtime values
# (notably ENCRYPTION_KEY, plus anything set via the "Update app env vars"
# workflow) are managed out-of-band in Secrets Manager and must survive
# later applies. Without this, every apply rewrites the blob from
# local.app_secret_values — regenerating ENCRYPTION_KEY and orphaning all
# data already encrypted under the previous key.
lifecycle {
ignore_changes = [secret_string]
}
}
10 changes: 10 additions & 0 deletions infra/terraform/envs/sandbox/app-deps.tf
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,14 @@ resource "aws_secretsmanager_secret" "app" {
resource "aws_secretsmanager_secret_version" "app" {
secret_id = aws_secretsmanager_secret.app.id
secret_string = jsonencode(local.app_secret_values)

# Terraform only *seeds* this secret on first creation. Runtime values
# (notably ENCRYPTION_KEY, plus anything set via the "Update app env vars"
# workflow) are managed out-of-band in Secrets Manager and must survive
# later applies. Without this, every apply rewrites the blob from
# local.app_secret_values — regenerating ENCRYPTION_KEY and orphaning all
# data already encrypted under the previous key.
lifecycle {
ignore_changes = [secret_string]
}
}
10 changes: 10 additions & 0 deletions infra/terraform/envs/test/app-deps.tf
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,14 @@ resource "aws_secretsmanager_secret" "app" {
resource "aws_secretsmanager_secret_version" "app" {
secret_id = aws_secretsmanager_secret.app.id
secret_string = jsonencode(local.app_secret_values)

# Terraform only *seeds* this secret on first creation. Runtime values
# (notably ENCRYPTION_KEY, plus anything set via the "Update app env vars"
# workflow) are managed out-of-band in Secrets Manager and must survive
# later applies. Without this, every apply rewrites the blob from
# local.app_secret_values — regenerating ENCRYPTION_KEY and orphaning all
# data already encrypted under the previous key.
lifecycle {
ignore_changes = [secret_string]
}
}
Loading