{"id":17276752,"url":"https://github.com/jSherz/terraform-provider-node-lambda-packager","last_synced_at":"2026-07-15T00:30:19.807Z","repository":{"id":153957777,"uuid":"627569805","full_name":"jSherz/terraform-provider-node-lambda-packager","owner":"jSherz","description":"Bundles your Lambda code and zips it up ready to feed into aws_lambda_function.","archived":false,"fork":false,"pushed_at":"2024-08-21T16:53:02.000Z","size":135,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-21T18:54:41.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jSherz.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":"2023-04-13T18:35:13.000Z","updated_at":"2024-08-21T16:49:36.000Z","dependencies_parsed_at":"2023-09-23T19:46:28.603Z","dependency_job_id":"d87b5d5a-e9bf-406d-9e14-db13b600701a","html_url":"https://github.com/jSherz/terraform-provider-node-lambda-packager","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jSherz%2Fterraform-provider-node-lambda-packager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jSherz%2Fterraform-provider-node-lambda-packager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jSherz%2Fterraform-provider-node-lambda-packager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jSherz%2Fterraform-provider-node-lambda-packager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jSherz","download_url":"https://codeload.github.com/jSherz/terraform-provider-node-lambda-packager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219844648,"owners_count":16556483,"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":[],"created_at":"2024-10-15T09:01:04.085Z","updated_at":"2026-07-15T00:30:19.762Z","avatar_url":"https://github.com/jSherz.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# terraform-provider-node-lambda-packager\n\n![Terraform](https://img.shields.io/badge/terraform-%235835CC.svg?style=for-the-badge\u0026logo=terraform\u0026logoColor=white) ![Terraform Provider Downloads](https://img.shields.io/terraform/provider/dt/4103.svg?style=for-the-badge)\n\nThis Terraform provider helps you to co-locate your Lambda application code\nwith your Infrastructure as Code (IaC). It uses esbuild to produce a bundle\nthat's then zipped up and made ready for Terraform to consume.\n\n## Usage\n\n```terraform\n#\n# 1. Use the data source to package up your NodeJS-based Lambda function.\n#\ndata \"node-lambda-packager_package\" \"create_user\" {\n  #\n  # 2. Set esbuild arguments as appropriate.\n  #\n  # See: https://esbuild.github.io/api/#build-api\n  #\n  args = [\n    \"--bundle\",\n    \"--minify\",\n    \"--platform=node\",\n    \"--sourcemap\",\n    \"--target=es2024\",\n    \"--sourcemap=inline\",\n  ]\n\n  #\n  # 3. The entrypoint file is relative to the working directory and you can\n  #    leave the working directory empty if it's already correct.\n  #\n  entrypoint        = \"src/handlers/v1/admin/users/create/index.ts\"\n  working_directory = \"\"\n}\n\n#\n# 4. Define your Lambda function as normal!\n#\nresource \"aws_lambda_function\" \"create_user\" {\n  function_name = \"create-user\"\n  role          = aws_iam_role.create_user.arn\n  architectures = [\"arm64\"]\n  handler       = \"index.handler\"\n  memory_size   = 1024\n  runtime       = \"nodejs22.x\"\n\n  #\n  # 5. Here's where our data source is used:\n  #\n  filename         = data.node-lambda-packager_package.create_user.filename\n  source_code_hash = data.node-lambda-packager_package.create_user.source_code_hash\n}\n```\n\nSee [jSherz/automate-aws-access-removal] for a more in-depth example of this\nprovider in use.\n\n[jSherz/automate-aws-access-removal]: https://github.com/jSherz/automate-aws-access-removal\n\n## Build\n\n```bash\nmake build\n```\n\n## Install for local testing\n\n```bash\nmake install\n```\n\n## Test\n\n```bash\nmake testacc\n```\n\n## Linting\n\nFor install steps, see [golang-ci-lint on GitHub]. Find the correct version to\nuse in the `./github/workflows/golangci-lint.yml` file.\n\n[golang-ci-lint on GitHub]: https://github.com/golangci/golangci-lint\n\n```bash\ngolangci-lint run\n```\n\n### Fixing formatting or input problems\n\nYou can run a single linter in fix mode as follows:\n\n```bash\ngolangci-lint run --no-config --enable gofumpt --fix\n```\n\n[gci] and [gofumpt] have to be run in order to have both agree about the import\norder and formatting:\n\n```bash\ngolangci-lint run --no-config --enable gci --fix\ngolangci-lint run --no-config --enable gofumpt --fix\n```\n\n[gci]: https://github.com/daixiang0/gci\n[gofumpt]: https://github.com/mvdan/gofumpt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FjSherz%2Fterraform-provider-node-lambda-packager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FjSherz%2Fterraform-provider-node-lambda-packager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FjSherz%2Fterraform-provider-node-lambda-packager/lists"}