{"id":20532465,"url":"https://github.com/joshdk/tfbundle","last_synced_at":"2025-04-14T06:31:27.160Z","repository":{"id":57527582,"uuid":"105202268","full_name":"joshdk/tfbundle","owner":"joshdk","description":"📦 Bundle a single artifact as a Terraform module","archived":false,"fork":false,"pushed_at":"2023-08-30T14:01:36.000Z","size":640,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T20:12:30.139Z","etag":null,"topics":["golang","lambda","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","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/joshdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-28T21:45:18.000Z","updated_at":"2020-10-03T01:27:03.000Z","dependencies_parsed_at":"2022-09-18T04:40:11.892Z","dependency_job_id":null,"html_url":"https://github.com/joshdk/tfbundle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Ftfbundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Ftfbundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Ftfbundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Ftfbundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshdk","download_url":"https://codeload.github.com/joshdk/tfbundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248833270,"owners_count":21168821,"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":["golang","lambda","terraform"],"created_at":"2024-11-16T00:15:02.972Z","updated_at":"2025-04-14T06:31:27.140Z","avatar_url":"https://github.com/joshdk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI][circleci-badge]][circleci-link]\n[![Go Report Card][go-report-card-badge]][go-report-card-link]\n[![License][license-badge]][license-link]\n[![Godoc][godoc-badge]][godoc-link]\n[![CodeCov][codecov-badge]][codecov-link]\n[![Releases][github-release-badge]][github-release-link]\n\n# TFBundle\n\n📦 Bundle a single artifact as a Terraform module\n\n## Installing\n\n### From source\n\nYou can install a development version of this tool by running:\n\n```bash\n$ go get -u github.com/joshdk/tfbundle\n```\n\n### Precompiled binary\n\nAlternatively, you can download a precompiled [release][github-release-link] binary by running:\n\n```bash\n$ wget -q https://github.com/joshdk/tfbundle/releases/download/0.1.0/tfbundle_linux_amd64\n$ sudo install tfbundle_linux_amd64 /usr/bin/tfbundle\n```\n\n## Usage\n\n### As a command line tool\n\nThe `tfbundle` tool can be used to consume a given file (`lambda.zip` in this example), and generate a fully contained Terraform module (`module.tgz`).\n\n```\n$ ls\nlambda.zip\n\n$ tfbundle -artifact lambda.zip -module module.tgz\n\n$ ls\nlambda.zip module.tgz\n\n$ tar -tf module.tgz\nmain.tf\nartifact\nartifact/lambda.zip\n```\n\n### As the resulting Terraform module\n\n#### Configuration\n\nThe resulting module takes no inputs, just a `source`.\n\n```hcl\nmodule \"artifact\" {\n  source = \"module.tgz\"\n}\n```\n\n#### Outputs\n\nThe `etag` output contains an entity tag for the bundled file. Used as a pass-through when configuring [`aws.s3_bucket_object.etag`](https://www.terraform.io/docs/providers/aws/r/s3_bucket_object.html#etag).\n\n```hcl\noutput \"etag\" {\n  value = \"${module.artifact.etag}\"\n}\n```\n\nThe `filename` output contains the absolute path to the bundled file.\n\n```hcl\noutput \"filename\" {\n  value = \"${module.artifact.filename}\"\n}\n```\n\nThe `size` output contains the size in bytes of the bundled file.\n\n```hcl\noutput \"size\" {\n  value = \"${module.artifact.size}\"\n}\n```\n\nThe `source_code_hash` output contains a content hash for the bundled file. Used as a pass-through when configuring [`aws.lambda_function.source_code_hash`](https://www.terraform.io/docs/providers/aws/r/lambda_function.html#source_code_hash).\n\n```hcl\noutput \"source_code_hash\" {\n  value = \"${module.artifact.source_code_hash}\"\n}\n```\n\n## License\n\nThis library is distributed under the [MIT License][license-link], see [LICENSE.txt][license-file] for more information.\n\n[circleci-badge]:        https://circleci.com/gh/joshdk/tfbundle.svg?\u0026style=shield\n[circleci-link]:         https://circleci.com/gh/joshdk/workflows/tfbundle/tree/master\n[go-report-card-badge]:  https://goreportcard.com/badge/github.com/joshdk/tfbundle\n[go-report-card-link]:   https://goreportcard.com/report/github.com/joshdk/tfbundle\n[license-badge]:         https://img.shields.io/badge/license-MIT-green.svg\n[license-file]:          https://github.com/joshdk/tfbundle/blob/master/LICENSE.txt\n[license-link]:          https://opensource.org/licenses/MIT\n[godoc-badge]:           https://godoc.org/github.com/joshdk/tfbundle/bundle?status.svg\n[godoc-link]:            https://godoc.org/github.com/joshdk/tfbundle/bundle\n[codecov-badge]:         https://codecov.io/gh/joshdk/tfbundle/branch/master/graph/badge.svg\n[codecov-link]:          https://codecov.io/gh/joshdk/tfbundle\n[github-release-badge]:  https://img.shields.io/github/release/joshdk/tfbundle/all.svg\n[github-release-link]:   https://github.com/joshdk/tfbundle/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdk%2Ftfbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshdk%2Ftfbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdk%2Ftfbundle/lists"}