{"id":14970623,"url":"https://github.com/elasticpath/terraform-env-vars","last_synced_at":"2025-10-26T13:31:00.368Z","repository":{"id":57111018,"uuid":"148533192","full_name":"elasticpath/terraform-env-vars","owner":"elasticpath","description":"Utility for transforming Terraform variables to environment variables","archived":false,"fork":false,"pushed_at":"2019-05-03T21:51:01.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-25T09:26:50.685Z","etag":null,"topics":["clojurescript","javascript","npm","terraform"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elasticpath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-12T19:45:40.000Z","updated_at":"2020-11-26T13:34:51.000Z","dependencies_parsed_at":"2022-08-20T20:20:17.082Z","dependency_job_id":null,"html_url":"https://github.com/elasticpath/terraform-env-vars","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fterraform-env-vars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fterraform-env-vars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fterraform-env-vars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fterraform-env-vars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elasticpath","download_url":"https://codeload.github.com/elasticpath/terraform-env-vars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238337175,"owners_count":19455264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojurescript","javascript","npm","terraform"],"created_at":"2024-09-24T13:43:52.364Z","updated_at":"2025-10-26T13:31:00.078Z","avatar_url":"https://github.com/elasticpath.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://www.elasticpath.com/sites/all/themes/bootstrap/images/elastlic-path-logo-RGB.svg\" alt=\"elasticpath logo\" title=\"elasticpath\" align=\"right\" width=\"150\"/\u003e\n\n### Terraform-env-vars\n\nThe `terraform-env-vars` is a small script that receives on `stdin` the\nTerraform output in JSON format and from the command line the mapping from\nTerraform variable names to environment variable names.\n\nGiven the above inputs, it does two things:\n\n * it validates the Terraform output against the mappings\n\n   **it displays errors and exits with 1 in case of failures**\n\n * it prints the list of environment variables on `stdout`\n\n   **the variables are separated by `=`, following the [dotenv](https://github.com/motdotla/dotenv) format**\n\nAn example of EDN environment map:\n\n```clojure\n{:terraform_db_user \"PGUSER\"\n :terraform_db_passaword \"PGPASSWORD\"}\n```\n\nYou can also pass a JSON file by using the `--json` options:\n\n```json\n{\"terraform_db_user\": \"PGUSER\",\n \"terraform_db_passaword\": \"PGPASSWORD\"}\n```\n\nRun `terraform-env-vars --help` for a help.\n\n#### Usage\n\n###### IMPORTANT NOTICE:\n\nThe scope of this package has been changed to `@elasticpath` since [`v1.1.0`](https://github.com/elasticpath/terraform-env-vars/releases/tag/v1.1.0). You can find previous versions under the `@ep-npm` scope.\n\n\n```shell\nnpm install -g @elasticpath/terraform-env-vars\n\ncd a-terraform-dir/  # choose your Terraform deployment dir\nterraform output -json | terraform-env-vars --edn env-vars.edn\n...\nPGUSER=\"...\"\nPGPASSWORD=\"...\"\n...\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## License\n\nCopyright 2018 Elastic Path\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticpath%2Fterraform-env-vars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felasticpath%2Fterraform-env-vars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticpath%2Fterraform-env-vars/lists"}