{"id":15292477,"url":"https://github.com/mrsauravsahu/t2d2","last_synced_at":"2025-04-13T11:12:01.813Z","repository":{"id":40425915,"uuid":"449815534","full_name":"mrsauravsahu/t2d2","owner":"mrsauravsahu","description":"Terraform Test Driven Development","archived":false,"fork":false,"pushed_at":"2022-05-09T12:28:03.000Z","size":6356,"stargazers_count":12,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T11:11:59.403Z","etag":null,"topics":["aws","azure","gcp","iac","infrastructure","tdd","terraform","tests"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/search?q=@t2d2","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrsauravsahu.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-19T18:48:19.000Z","updated_at":"2025-03-09T02:04:54.000Z","dependencies_parsed_at":"2022-08-09T20:10:28.554Z","dependency_job_id":null,"html_url":"https://github.com/mrsauravsahu/t2d2","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Ft2d2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Ft2d2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Ft2d2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Ft2d2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsauravsahu","download_url":"https://codeload.github.com/mrsauravsahu/t2d2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703199,"owners_count":21148118,"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":["aws","azure","gcp","iac","infrastructure","tdd","terraform","tests"],"created_at":"2024-09-30T16:18:07.226Z","updated_at":"2025-04-13T11:12:01.792Z","avatar_url":"https://github.com/mrsauravsahu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# t2d2\n\nTerraform Test Driven Development\n\n## Why?\n\nTesting Terraform code currently requires knowledge of a new set of tools which make crossing the bridge from Application Development to Infrastructure quite difficult.\n\n## How?\n\nt2d2 helps bridge this gap by allowing you write your IaC tests with familiar JavaScript testing frameworks like [Jest](https://jestjs.io/), [Mocha](https://mochajs.org), [UVU](https://github.com/lukeed/uvu) etc.,.\n\n## Getting Started\n\n1. Create a starter jest project.\nYou can explore the sample test in [resources.ts](srv/test-template/__tests__/resources.ts)\n\n```bash\nmkdir my-infra-project\ncd my-infra-project\nnpm init @t2d2/jest-starter\n```\n\n2. Customize the terraform workspace path in your tests' `beforeAll` hook, if required.\n\n```typescript\n...\n\nprofile = await t2d2.init({\n  profileName: 'resources',\n  workspaceDir: './tf', # \u003c--\n})\n\n...\n```\n\n3. Start your TDD cycles.\n\n# Packages\n\n## @t2d2/core\n\nMain package in the t2d2 Suite, helps with:\n- Setting up the Terraform workspace through code\n- Functions to write unit tests\n\n## @t2d2/create-jest-starter\n\nnpm init package to setup a jest test project with t2d2\n\n## @t2d2/jest-matchers\n\nt2d2 core test helpers, supercharged as jest custom matchers\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsauravsahu%2Ft2d2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsauravsahu%2Ft2d2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsauravsahu%2Ft2d2/lists"}