{"id":50142006,"url":"https://github.com/launchbynttdata/launch-terraform-template","last_synced_at":"2026-05-24T02:01:36.007Z","repository":{"id":353662858,"uuid":"1219387324","full_name":"launchbynttdata/launch-terraform-template","owner":"launchbynttdata","description":"Template for Launch's Terraform Modules. This starting point is utilized by our IaC automation to produce individual modules.","archived":false,"fork":false,"pushed_at":"2026-05-13T18:07:21.000Z","size":82,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-13T20:07:50.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/launchbynttdata.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-23T20:32:23.000Z","updated_at":"2026-05-06T19:02:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/launchbynttdata/launch-terraform-template","commit_stats":null,"previous_names":["launchbynttdata/launch-terraform-template"],"tags_count":8,"template":true,"template_full_name":null,"purl":"pkg:github/launchbynttdata/launch-terraform-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Flaunch-terraform-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Flaunch-terraform-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Flaunch-terraform-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Flaunch-terraform-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/launchbynttdata","download_url":"https://codeload.github.com/launchbynttdata/launch-terraform-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Flaunch-terraform-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33418550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-05-24T02:01:35.295Z","updated_at":"2026-05-24T02:01:35.995Z","avatar_url":"https://github.com/launchbynttdata.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TF Module Template\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![License: CC BY-NC-ND 4.0](https://img.shields.io/badge/License-CC_BY--NC--ND_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-nd/4.0/)\n\n## Overview\n\nThis repository contains an example Terraform module that is designed to be transformed into another module.\n\n```mermaid\nflowchart RL\n    template --\u003e|Pulls latest changes| skeleton\n    primitives --\u003e|Pulls latest changes| skeleton\n    template ---\u003e|Used in producing module repositories| modules\n    modules --\u003e|Produces| primitives\n\n    youarehere[\"\u003ch3\u003eYou Are Here\u003c/h3\u003e\"]\n    youarehere ==\u003e template\n\n    template[\"\u003cstrong\u003e\u003ca href=\"https://github.com/launchbynttdata/launch-terraform-template\"\u003elaunch-terraform-template\u003c/a\u003e\u003c/strong\u003e\u003cbr/\u003e\u003cbr/\u003eImplements launch-terraform-skeleton, provides a starting point for expected files that make up a Launch Terraform primitive. This repository is used as a template source when other repositories are created.\"]\n\n    primitives[\"\u003cstrong\u003e\u003ca href=\"https://github.com/orgs/launchbynttdata/repositories?q=module_primitive\"\u003eTerraform Primitives\u003c/a\u003e\u003c/strong\u003e\u003cbr/\u003e\u003cbr/\u003eLaunch's Terraform modules, plus their tests, one per repository. These modules regularly look for updates in launch-terraform-skeleton and autoupdate themselves where possible.\"]\n\n    modules[\"\u003cstrong\u003e\u003ca href=\"https://github.com/launchbynttdata/launch-terraform-modules\"\u003elaunch-terraform-modules\u003c/a\u003e\u003c/strong\u003e\u003cbr/\u003e\u003cbr/\u003eTerragrunt repository defining all of our Terraform primitive modules. Our existing modules will be imported here, our new modules will be configured here going forward.\"]\n\n    skeleton[\"\u003cstrong\u003e\u003ca href=\"https://github.com/launchbynttdata/launch-terraform-skeleton\"\u003elaunch-terraform-skeleton\u003c/a\u003e\u003c/strong\u003e\u003cbr\u003e\u003cbr/\u003eCommon workflows and configurations shared by\u003cbr/\u003eTerraform modules. Updates to this repository are\u003cbr/\u003econsumed by the repositories that implement it\u003cbr/\u003eon a regular schedule.\"]\n```\n\n## How to Use This Repo\n\nThis repo is intended to be used as a template for any new TF module.\n\n\u003e [!CAUTION]\n\u003e Your changes only belong in this repo if they modify the default module, examples, tests, or documentation used for Terraform Primitive templating purposes. If you need to make changes to the shared configuration files and workflows, see the [launch-terraform-skeleton](https://github.com/launchbynttdata/launch-terraform-skeleton) repository.\n\u003e\n\u003e If you need to create a new Terraform module, see the launch-terraform-modules](https://github.com/launchbynttdata/launch-terraform-modules) repository.\n\n## Pre-Requisites\n\nThe following commands should be available on your system:\n\n- `asdf` or `mise`\n- `make`\n- `python3` (for pre-commit)\n\nAdditionally, your `git` user and email must be configured. Run the `make configure` command from the root of the repository to ensure that you meet these requirements.\n\n### Templating\n\n#### GitHub Templating\n\nThis repository is used as a GitHub template by the [launch-terraform-modules](https://github.com/launchbynttdata/launch-terraform-modules) repository. If you are a Launch Engineer who needs to create a new Terraform module, you should start there.\n\n#### Manual Templating\n\nThis applies to systems like Azure DevOps and CodeCommit.\n\nWe need to clone the repo and start a fresh git history to get rid of the `launch-terraform-template` history. Below is a loose explanation of how to do this.\n\n``` shell\ngit clone \u003cthis repo's URL\u003e tf-\u003cwhatever it is you're building\u003e\ncd tf-\u003cwhatever it is you're building\u003e\nrm -rf .git\ngit init -b main\n```\n\n#### Remove Educational Material\n\nWe need to clear out the example code (different from the boilerplate code). We want to save the repo structure; we don't need the contents. There are `examples`, and `tests` that apply to the boilerplate that we're not going to need as developers of new modules.\n\nNote: Before you clear these things out, it's useful to actually understand what they are and why they're there. We'll be building our own as we go forward, so we need to know what it is we're removing. If this isn't your first module, it's safe to fly through this. If this is your first (or your first several, even), take the time to read the code before you remove it.\n\n```shell\ncd path/to/this/repo\nrm -rf examples/*\nrm -rf README.md\nmv TEMPLATED_README.md README.md\n```\n\n### Repo Setup\n\n#### Module Configuration\n\n- You'll need to update [`versions.tf`](./versions.tf) based on your provider needs.\n\n## Explanation of the Template\n\n### Resources and Providers\n\nIn this example module we generate text resources with the `random` provider in a similar manner to our Terraform Primitive Modules, with a single resource in the root module and at least one example module instantiating that root module. In reality, the provider tends to be a cloud provider (our ecosystem has strong support for `aws` and `azure*` providers).\n\n### Module Guidelines\n\n- Each repository should have a default module in its root\n  - Should have default values and be instantiable with minimal to no inputs\n  - We can think of these default values as the \"default example\"\n- A `Makefile` provides tasks for terraform module development\n  - For clearing cached components, it provides a `make clean` command\n  - Linter config and other shared files are defined in the [launch-terraform-skeleton](https://github.com/launchbynttdata/launch-terraform-skeleton) repository. This template and the modules created from it will automatically check for updates of the skeleton.\n- An `examples` folder contains example uses of the default and nested modules\n  - There should be at least one example for each nested module\n  - For modules that are compatible with more than one major version of a provider, an example using the latest minor/patch release of every supported major version must be included.\n- A `tests` folder contains Go functional tests\n  - Make pre-deploy tests that validate terraform plan json where applicable\n  - Make post-deploy tests that validate the deployment where applicable\n- Provider should be configured by the consumer of this module, not the module itself\n  - Modules only define what providers/versions are required\n  - provider.tf is generated on the fly by tests/examples when needed\n\n### Go Functional Tests\n\n- Modules are how Go manages dependencies\n- To initiate a new module, run the command: `go mod init [repo_url]`\n  - It is recommended to use the absolute repository url (e.g. github.com/launchbynttdata/launch-terraform-template)\n- Relative path is highly discouraged in Go, use absolute path to import a package\n  - (e.g. `github.com/launchbynttdata/launch-terraform-template/[path_to_file]`)\n- To update paths or versions, run the command: `go get -t ./...`; Go will update the dependencies accordingly\n\n### Workflows\n\nThis template includes workflows to check both an AWS and an Azure Terraform module using our launch-workflows repository's reusable workflows. The workflow will automatically select between the correct provider authentication method based on the name of the downstream repository.\n\nThe `launchbynttdata` organization has the appropriate secrets and variables set for these workflows, but if you intend to use them outside of the `launchbynttdata` organization, you may need to configure secrets and variables for your use case. See the [documentation in launch-workflows](https://github.com/launchbynttdata/launch-workflows/tree/main/docs) for more details specific to your desired workflow.\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | ~\u003e 1.0 |\n| \u003ca name=\"requirement_random\"\u003e\u003c/a\u003e [random](#requirement\\_random) | ~\u003e 3.6 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [random_string.string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_length\"\u003e\u003c/a\u003e [length](#input\\_length) | Length of the random string to generate. | `number` | `24` | no |\n| \u003ca name=\"input_number\"\u003e\u003c/a\u003e [number](#input\\_number) | Whether the random string should include numbers. Defaults to true. | `bool` | `true` | no |\n| \u003ca name=\"input_special\"\u003e\u003c/a\u003e [special](#input\\_special) | Whether the random string should include special characters. Defaults to false. | `bool` | `false` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_string\"\u003e\u003c/a\u003e [string](#output\\_string) | The random string generated from the configured inputs. |\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchbynttdata%2Flaunch-terraform-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaunchbynttdata%2Flaunch-terraform-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchbynttdata%2Flaunch-terraform-template/lists"}