AWS DR Recovery Environment Variables

The following S3_RECOVER_FROM_* environment variables are deployed only on the secondary (standby) cluster. They are automatically set by Terraform when dr = "standby".

Environment Variable Reference:

Variable Source Purpose Example
S3_RECOVER_FROM_BUCKET Primary remote state (s3_bucket_id) S3 bucket name to recover data from logscale-s3-<primary-cluster>-us-west-2-123456789012
S3_RECOVER_FROM_REGION Primary remote state (s3_bucket_region) AWS region of the source bucket us-west-2
S3_RECOVER_FROM_ENCRYPTION_KEY_SECRET_NAME tfvars or auto-derived K8s secret containing source encryption key <secondary-cluster>-s3-storage-encryption
S3_RECOVER_FROM_ENCRYPTION_KEY_SECRET_KEY tfvars or auto-derived Key within the K8s secret s3-storage-encryption-key
S3_RECOVER_FROM_REPLACE_REGION tfvars (s3_recover_from_replace_region) Replace source region with target region in bucket path us-west-2/us-east-2
S3_RECOVER_FROM_REPLACE_BUCKET tfvars (s3_recover_from_replace_bucket) Replace source bucket with target bucket in writes entry entry logscale-s3-<primary-cluster>-.../logscale-s3-<secondary-cluster>-...
ENABLE_ALERTS Auto-set based on dr variable false on standby, true on active false

How Terraform Sets These Values:

  1. s3_recover_from_bucket: Fetched from primary remote state (s3_bucket_id output) or set explicitly in tfvars

  2. s3_recover_from_region: Fetched from primary remote state (s3_bucket_region output) or set explicitly in tfvars

  3. s3_recover_from_replace_region: Dynamically generated as primary_region/secondary_region from remote state, or set explicitly

  4. s3_recover_from_replace_bucket: Dynamically generated as primary_bucket/secondary_bucket using remote state values

  5. Encryption key: Fetched from primary remote state and stored in a Kubernetes secret, then referenced via secretKeyRef

  6. ENABLE_ALERTS: Set to "false" when dr="standby", "true" when dr="active". When dr="" (non-DR deployment), this env var is omitted entirely from the HumioCluster spec