{"id":17,"date":"2022-03-20T10:42:00","date_gmt":"2022-03-20T15:42:00","guid":{"rendered":"https:\/\/34.82.124.6\/?p=17"},"modified":"2022-07-31T08:24:11","modified_gmt":"2022-07-31T13:24:11","slug":"add-permanent-environment-variables","status":"publish","type":"post","link":"https:\/\/cloudlearning365.com\/?p=17","title":{"rendered":"Add permanent environment variables"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s how I took care of it:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is rather easy, just go to&nbsp;<strong>System Properties<\/strong>&nbsp;by running&nbsp;<strong>sysdm.cpl<\/strong>&nbsp;in command line, then click on&nbsp;<strong>Environment Variables<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-6.png\" alt=\"\" class=\"wp-image-30\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Add or edit existing environment variables, such as&nbsp;<strong>AWS_ACCESS_KEY_ID<\/strong>&nbsp;or&nbsp;<strong>AWS_SECRET_ACCESS_KEY<\/strong>, the settings will take effect next time when you launch your command prompt or PowerShell session<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-7.png\" alt=\"\" class=\"wp-image-31\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Linux \/ Mac<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First you have to find out what shell you are using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ echo $SHELL<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>If it returns: \/bin\/bash, then you are using bash, and need to edit ~\/.bashrc<\/li><li>If it returns: \/bin\/zsh, then you are using zsh, and need to edit ~\/.zshrc<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example of <strong>~\/.bashrc<\/strong> file. Make sure to place\u00a0<strong>export\u00a0<\/strong>in front of each line, and there should be <strong>no whitespace<\/strong> around equal sign = <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cat ~\/.bashrc\n\n# environment variables\nexport AVIATRIX_CONTROLLER_IP='****'\nexport AVIATRIX_PASSWORD='****'\nexport AVIATRIX_USERNAME='****'\nexport AWS_ACCESS_KEY_ID='****'\nexport AWS_SECRET_ACCESS_KEY='****'\nexport GOOGLE_APPLICATION_CREDENTIALS='****'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next time when you launch console session, these settings will take effect<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to&nbsp;System Properties&nbsp;by running&nbsp;sysdm.cpl&nbsp;in command &hellip; <a href=\"https:\/\/cloudlearning365.com\/?p=17\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-terraform"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jun Ye\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/cloudlearning365.com\/?p=17\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"cloudlearning365 - Cloud Learning 365\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Add permanent environment variables - cloudlearning365\" \/>\n\t\t<meta property=\"og:description\" content=\"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/cloudlearning365.com\/?p=17\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-03-20T15:42:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-07-31T13:24:11+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Add permanent environment variables - cloudlearning365\" \/>\n\t\t<meta name=\"twitter:description\" content=\"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#blogposting\",\"name\":\"Add permanent environment variables - cloudlearning365\",\"headline\":\"Add permanent environment variables\",\"author\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cloudlearning365.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/image-6.png\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17\\\/#articleImage\"},\"datePublished\":\"2022-03-20T10:42:00-05:00\",\"dateModified\":\"2022-07-31T08:24:11-05:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#webpage\"},\"articleSection\":\"terraform\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cloudlearning365.com\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?cat=8#listItem\",\"name\":\"terraform\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?cat=8#listItem\",\"position\":2,\"name\":\"terraform\",\"item\":\"https:\\\/\\\/cloudlearning365.com\\\/?cat=8\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#listItem\",\"name\":\"Add permanent environment variables\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#listItem\",\"position\":3,\"name\":\"Add permanent environment variables\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?cat=8#listItem\",\"name\":\"terraform\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/#organization\",\"name\":\"cloudlearning365\",\"description\":\"Cloud Learning 365\",\"url\":\"https:\\\/\\\/cloudlearning365.com\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?author=2#author\",\"url\":\"https:\\\/\\\/cloudlearning365.com\\\/?author=2\",\"name\":\"Jun Ye\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7466a2c255038bbc3f25d69c0a3064fbee426fc68053479ec307b1ef08f822d7?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jun Ye\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#webpage\",\"url\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17\",\"name\":\"Add permanent environment variables - cloudlearning365\",\"description\":\"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\\u2019t stay between sessions. Here\\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?p=17#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/?author=2#author\"},\"datePublished\":\"2022-03-20T10:42:00-05:00\",\"dateModified\":\"2022-07-31T08:24:11-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/#website\",\"url\":\"https:\\\/\\\/cloudlearning365.com\\\/\",\"name\":\"cloudlearning365\",\"description\":\"Cloud Learning 365\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudlearning365.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Add permanent environment variables - cloudlearning365","description":"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings","canonical_url":"https:\/\/cloudlearning365.com\/?p=17","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/cloudlearning365.com\/?p=17#blogposting","name":"Add permanent environment variables - cloudlearning365","headline":"Add permanent environment variables","author":{"@id":"https:\/\/cloudlearning365.com\/?author=2#author"},"publisher":{"@id":"https:\/\/cloudlearning365.com\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-6.png","@id":"https:\/\/cloudlearning365.com\/?p=17\/#articleImage"},"datePublished":"2022-03-20T10:42:00-05:00","dateModified":"2022-07-31T08:24:11-05:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/cloudlearning365.com\/?p=17#webpage"},"isPartOf":{"@id":"https:\/\/cloudlearning365.com\/?p=17#webpage"},"articleSection":"terraform"},{"@type":"BreadcrumbList","@id":"https:\/\/cloudlearning365.com\/?p=17#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/cloudlearning365.com\/#listItem","position":1,"name":"Home","item":"https:\/\/cloudlearning365.com\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudlearning365.com\/?cat=8#listItem","name":"terraform"}},{"@type":"ListItem","@id":"https:\/\/cloudlearning365.com\/?cat=8#listItem","position":2,"name":"terraform","item":"https:\/\/cloudlearning365.com\/?cat=8","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudlearning365.com\/?p=17#listItem","name":"Add permanent environment variables"},"previousItem":{"@type":"ListItem","@id":"https:\/\/cloudlearning365.com\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/cloudlearning365.com\/?p=17#listItem","position":3,"name":"Add permanent environment variables","previousItem":{"@type":"ListItem","@id":"https:\/\/cloudlearning365.com\/?cat=8#listItem","name":"terraform"}}]},{"@type":"Organization","@id":"https:\/\/cloudlearning365.com\/#organization","name":"cloudlearning365","description":"Cloud Learning 365","url":"https:\/\/cloudlearning365.com\/"},{"@type":"Person","@id":"https:\/\/cloudlearning365.com\/?author=2#author","url":"https:\/\/cloudlearning365.com\/?author=2","name":"Jun Ye","image":{"@type":"ImageObject","@id":"https:\/\/cloudlearning365.com\/?p=17#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/7466a2c255038bbc3f25d69c0a3064fbee426fc68053479ec307b1ef08f822d7?s=96&d=mm&r=g","width":96,"height":96,"caption":"Jun Ye"}},{"@type":"WebPage","@id":"https:\/\/cloudlearning365.com\/?p=17#webpage","url":"https:\/\/cloudlearning365.com\/?p=17","name":"Add permanent environment variables - cloudlearning365","description":"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/cloudlearning365.com\/#website"},"breadcrumb":{"@id":"https:\/\/cloudlearning365.com\/?p=17#breadcrumblist"},"author":{"@id":"https:\/\/cloudlearning365.com\/?author=2#author"},"creator":{"@id":"https:\/\/cloudlearning365.com\/?author=2#author"},"datePublished":"2022-03-20T10:42:00-05:00","dateModified":"2022-07-31T08:24:11-05:00"},{"@type":"WebSite","@id":"https:\/\/cloudlearning365.com\/#website","url":"https:\/\/cloudlearning365.com\/","name":"cloudlearning365","description":"Cloud Learning 365","inLanguage":"en-US","publisher":{"@id":"https:\/\/cloudlearning365.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"cloudlearning365 - Cloud Learning 365","og:type":"article","og:title":"Add permanent environment variables - cloudlearning365","og:description":"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings","og:url":"https:\/\/cloudlearning365.com\/?p=17","article:published_time":"2022-03-20T15:42:00+00:00","article:modified_time":"2022-07-31T13:24:11+00:00","twitter:card":"summary_large_image","twitter:title":"Add permanent environment variables - cloudlearning365","twitter:description":"When you are using terraform or some other tools requiring environment variables, you may find the environment variables doesn\u2019t stay between sessions. Here\u2019s how I took care of it: Windows This is rather easy, just go to System Properties by running sysdm.cpl in command line, then click on Environment Variables Add or edit existing environment variables, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY, the settings"},"aioseo_meta_data":{"post_id":"17","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2023-04-07 16:49:14","updated":"2026-10-22 22:45:01","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudlearning365.com\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudlearning365.com\/?cat=8\" title=\"terraform\">terraform<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tAdd permanent environment variables\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/cloudlearning365.com\/"},{"label":"terraform","link":"https:\/\/cloudlearning365.com\/?cat=8"},{"label":"Add permanent environment variables","link":"https:\/\/cloudlearning365.com\/?p=17"}],"_links":{"self":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17"}],"version-history":[{"count":3,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":343,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions\/343"}],"wp:attachment":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}