2022-02-14 22:09:13 +01:00
2021-10-27 09:52:16 +02:00
2021-10-26 14:00:08 +02:00
2021-10-26 18:06:15 +02:00
2021-10-27 09:52:16 +02:00
2022-02-14 22:09:13 +01:00

What's this?

getenv will fetch Google Cloud (Compute Engine) metadata attributes and print them as K=V pairs ready to be exported as environment variables.

Example:

getenv
MY_VARIABLE=SOMEVALUE

How to use

Export all metadata attributes as ENV variables for current shell session and store them in /etc/environment for future sessions:

export $(getenv)
getenv 1>> /etc/environment

or

getenv 1>> /etc/environment
source /etc/environment
Description
Export Google Cloud (Compute Engine) metadata as environment variables.
Readme MIT 4.3 MiB
Languages
Go 86.5%
Makefile 13.5%