Introduction
In certain cases, it may be necessary to access the Rails console, a form of command-line interface, to debug Terraform Enterprise issues or, even more rarely, make changes to data.
Use Case
It may be necessary to access the Rails console in the following situations.
If using SAML and access to the local non-SSO Site Admin user is lost.
If a user has lost access to the
owners
team of a given organization.
Procedure
Please be aware of the following caveats before continuing.
Do not access the application console unless directed by HashiCorp Support.
Only run the commands provided.
If any command returns unexpected output, do not proceed further.
Terraform Enterprise
To access the Rails console in Terraform Enterprise, perform the following.
SSH into the Terraform Enterprise instance.
Execute the following command to access the Rails console.
sudo docker exec -it ptfe_atlas /usr/bin/init.sh /app/scripts/wait-for-token -- bash -i -c 'cd /app && ./bin/rails c'