{"id":16725268,"url":"https://github.com/unfor19/tfcoding","last_synced_at":"2025-06-12T01:33:25.274Z","repository":{"id":41440215,"uuid":"349755268","full_name":"unfor19/tfcoding","owner":"unfor19","description":"Render Terraform's Expressions and Functions locally without any hassle.","archived":false,"fork":false,"pushed_at":"2024-01-14T00:33:16.000Z","size":153,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T10:42:03.923Z","etag":null,"topics":["coding","debugging","docker","render","terraform"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unfor19.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-20T14:58:47.000Z","updated_at":"2024-05-14T08:26:03.000Z","dependencies_parsed_at":"2024-01-12T20:21:12.333Z","dependency_job_id":"4108bb22-078c-428b-9dca-4a3028e5746c","html_url":"https://github.com/unfor19/tfcoding","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/unfor19/tfcoding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Ftfcoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Ftfcoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Ftfcoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Ftfcoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unfor19","download_url":"https://codeload.github.com/unfor19/tfcoding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Ftfcoding/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259377114,"owners_count":22848292,"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":["coding","debugging","docker","render","terraform"],"created_at":"2024-10-12T22:48:35.547Z","updated_at":"2025-06-12T01:33:25.234Z","avatar_url":"https://github.com/unfor19.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tfcoding\r\n\r\n[![Push latest version to DockerHub](https://github.com/unfor19/tfcoding/actions/workflows/docker-latest.yml/badge.svg)](https://github.com/unfor19/tfcoding/actions/workflows/docker-latest.yml) [![Dockerhub pulls](https://img.shields.io/docker/pulls/unfor19/tfcoding)](https://hub.docker.com/r/unfor19/tfcoding)\r\n\r\n![tfcoding](https://d33vo9sj4p3nyc.cloudfront.net/tfcoding/tfcoding-localstack-aws.gif)\r\n\r\nRender Terraform's [Expressions](https://www.terraform.io/docs/language/expressions/index.html) and [Functions](https://www.terraform.io/docs/language/functions/index.html) locally without any hassle.\r\n\r\nThis application runs in the background and watches for changes in the file `tfcoding.tf`, once this file is modified its [Local Values](https://www.terraform.io/docs/language/values/locals.html) are automatically rendered to the terminal's output (stdout).\r\n\r\nThis is especially useful for learning about Expressions and Functions that you are not familiar with, while avoiding the whole shebang of terraform init, plan and apply. The goal here is to \"compile Terraform\" locally to speed up the development (and learning) process.\r\n\r\n## Requirements\r\n\r\n- [Docker](https://docs.docker.com/get-docker/)\r\n- (Optional) [Docker Compose](https://docs.docker.com/compose/install/)\r\n- **Windows**\r\n\r\n  - [Windows Git Bash](https://gitforwindows.org/)\r\n  - [Chocolatey Windows Package Manager](https://chocolatey.org/install)\r\n\r\n    **IMPORTANT**: Open a PowerShell terminal as Administrator\r\n\r\n    ```powershell\r\n    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\r\n    ```\r\n\r\n  - Install requirements\r\n\r\n    **IMPORTANT**: Open a PowerShell terminal as Administrator\r\n\r\n    ```bash\r\n    choco install -y make\r\n    ```\r\n\r\n- **macOS**:\r\n  - [Homebrew macOS Package Manager](https://brew.sh/)\r\n    ```bash\r\n    /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\r\n    ```\r\n  - Install requirements\r\n    ```bash\r\n    brew install make\r\n    ```\r\n\r\n## Quick Start\r\n\r\n1. Clone this repo\r\n   ```bash\r\n   git clone https://github.com/unfor19/tfcoding.git\r\n   ```\r\n1. From now on your working direcotry should be `tfcoding`\r\n   ```\r\n   cd tfcoding\r\n   ```\r\n1. Render [examples/basic/tfcoding.tf](./examples/basic/tfcoding.tf) - Make changes in that file, like checking new [Terraform Expressions](https://developer.hashicorp.com/terraform/language/expressions)\r\n   ```\r\n   make run\r\n   ```\r\n1. Clean resources - Removes `tfcoding` container\r\n   ```bash\r\n   make clean\r\n   ```\r\n\r\n## Getting Started\r\n\r\nThis project uses [localstack](https://github.com/localstack/localstack), which means you can provision the [AWS core resources](https://github.com/localstack/localstack#overview), see [examples/mock-aws/](./examples/mock-aws/).\r\n\r\n1. Clone this repo\r\n   ```bash\r\n   git clone https://github.com/unfor19/tfcoding.git\r\n   ```\r\n1. From now on your working direcotry should be `tfcoding`\r\n   ```\r\n   cd tfcoding\r\n   ```\r\n1. Render [examples/mock-aws/tfcoding.tf](./examples/mock-aws/tfcoding.tf) - Make changes in that file, like changing the CIDR of subnets\r\n   ```\r\n   make up-aws\r\n   ```\r\n1. Execute `terraform destroy` on changing `tfcoding.tf`, add the Local Value `terraform_destroy = true`. For example:\r\n\r\n   ```go\r\n   // After \"destroying\" the infra, comment out this variable to execute `terraform apply`\r\n   locals {\r\n     terraform_destroy = true\r\n   }\r\n   ```\r\n\r\n1. Clean resources - Removes `tfcoding` and `localstack` containers\r\n   ```bash\r\n   make clean-all\r\n   ```\r\n\r\n## Help Menu\r\n\r\n```bash\r\nmake help\r\n```\r\n\r\nWith Docker:\r\n\r\n```bash\r\ndocker run --rm -it unfor19/tfcoding --help\r\n```\r\n\r\n\u003c!-- replacer_start_helpmenu --\u003e\r\n\r\n```bash\r\nUsage: bash entrypoint.sh -r basic/exmaples --watching -o private_subnets\r\n\r\n\t--src_dir_relative_path  |  -r    [REQUIRED]  Relative path to the dir that contains tfcoding.tf\r\n\t--single_value_output    |  -o    [all]       Render a single local variable\r\n\t--src_dir_root           |  -s    [/src]      Source root dir in container\r\n\t--logging                |  -l    [true]      Show logging messages\r\n\t--debug                  |  -d    [false]     Print verbose output\r\n\t--watching               |  -w    [FLAG]      Auto-render tfcoding.tf on change\r\n\t--mock_aws               |  -aws  [FLAG]      Use this flag for communicating with Localstack\r\n```\r\n\r\n\u003c!-- replacer_end_helpmenu --\u003e\r\n\r\n## Authors\r\n\r\nCreated and maintained by [Meir Gabay](https://github.com/unfor19)\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/unfor19/tfcoding/blob/master/LICENSE) file for details\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfor19%2Ftfcoding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funfor19%2Ftfcoding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfor19%2Ftfcoding/lists"}