SAP-samples / teched2024-XP280

From clicks to code: Managing your SAP BTP infrastructure with Terraform
Apache License 2.0
12 stars 12 forks source link

Add env var user and pass to .bashrc #42

Open qmacro opened 2 days ago

qmacro commented 2 days ago

Participants were starting new shells (new terminal sessions) and losing any explicitly set BTP_USERNAME and BTP_PASSWORD values, in Codespace-based or Dev Container (without devcontainer.env) based contexts.

Might be a good idea to get the participants to add the export ... lines to the end of $HOME/.bashrc instead / as well so the env vars are present in all new shells.

lechnerc77 commented 2 days ago

For the devcontainer setup user can and should add the credentials to the devcontainer.env file. These credentials are then available in the container for all Terminal sessions and I would highly recommend this.

In case of a local setup (or if participants used the non-env devcontainer) I would recommend to put the credentials in a .env file and either execute the export $(xargs <.env) command in bash or add this export command in the .bashrc.I would not put the password directly into .bashrc.