PROBLEM
During the installation of TFE FDO on Docker, the container stops and the one of the similar errors is displayed in the output of docker compose logs --follow
:
"Error reading Vault configuration: failed decrypting unseal key: could not decrypt ciphertext: chacha20poly1305: message authentication failed"
[ERROR] terraform-enterprise: check failed: name=database duration=1m30.008561657s err=\"timeout: context deadline exceeded\""}
CAUSE
A dollar sign ($) was utilized in the Docker Compose file for configuring a password. Docker compose will try to interpolate variables when $VAR or ${VAR} is present
example:
version: '3.8'
services:
my_service:
image: my_image
environment:
- PASSWORD=$mypassword
This can be validated by running docker inspect terraform-enterprise-tfe-1
(the container needs to be in running state) and analyzing the values of TFE_ENCRYPTION_PASSWORD
, TFE_DATABASE_PASSWORD
, TFE_REDIS_PASSWORD
, etc.
SOLUTION
When configuring settings in your system, employ a double-dollar sign ($$) to represent a literal dollar sign. Specifically, when incorporating a "$" sign within a password, it should be accompanied by an additional "$" sign to ensure proper interpretation.
example:
version: '3.8'
services:
my_service:
image: my_image
environment:
- PASSWORD=$$mypassword
ADDITIONAL INFORMATION