Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Goglang with aws-vault

I use aws-vault to establish a secure sesssion to my dev AWS env in ZSH, all good. Now I want to run my IDE (Gogland) such that it assumes that aws-vault session so that I can then in turn debug some tests that have a dependency on S3.

How can I can a process (such as Gogland) so that it inherits the aws-vault session? I have tried simply starting Gogland from the shell after having established a vault session to no avail.

like image 568
Myles McDonnell Avatar asked Oct 09 '17 14:10

Myles McDonnell


People also ask

Where does AWS vault store credentials?

AWS Vault is a tool to securely store and access AWS credentials in a development environment. AWS Vault stores IAM credentials in your operating system's secure keystore and then generates temporary credentials from those to expose to your shell and applications.

Is HashiCorp vault in AWS?

A unified interface to manage and encrypt secrets on the AWS Cloud. This Quick Start sets up a flexible, scalable Amazon Web Services (AWS) Cloud environment and launches HashiCorp Vault automatically into the configuration of your choice.


1 Answers

Go to Tools | Create Command-line Launcher... and it will ask you where it should create that launcher. By default it's /usr/local/bin/gogland but if that is not writable by your user, create it in your user Home directory and then move it in the above mentioned place or another place in your PATH.

Then run aws-vault exec home -- gogland and this should set the environment variables for Gogland to inherit. If you are using the JetBrains Toolbox App, which I highly recommend, then you need to launch the Toolbox instead of the so that it can then launch the IDE with the correct environment variables.

like image 56
dlsniper Avatar answered Sep 21 '22 08:09

dlsniper