{"id":23507383,"url":"https://github.com/k-candidate/tf-module-dynamodb","last_synced_at":"2025-05-12T15:51:06.035Z","repository":{"id":217068114,"uuid":"743029730","full_name":"k-candidate/tf-module-dynamodb","owner":"k-candidate","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-15T12:50:06.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T19:15:22.414Z","etag":null,"topics":["dynamodb","gha","github-actions","python","python-lambda","python3","sqs","sqs-queue","terraform","terraform-module","tfsec"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/k-candidate.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-14T05:04:17.000Z","updated_at":"2024-02-04T19:56:25.000Z","dependencies_parsed_at":"2024-01-14T11:25:49.353Z","dependency_job_id":"19560cdc-3a36-4df4-8a1b-24f224a34b4f","html_url":"https://github.com/k-candidate/tf-module-dynamodb","commit_stats":null,"previous_names":["k-candidate/tf-module-dynamodb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-candidate%2Ftf-module-dynamodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-candidate%2Ftf-module-dynamodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-candidate%2Ftf-module-dynamodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-candidate%2Ftf-module-dynamodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k-candidate","download_url":"https://codeload.github.com/k-candidate/tf-module-dynamodb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253768483,"owners_count":21961337,"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":["dynamodb","gha","github-actions","python","python-lambda","python3","sqs","sqs-queue","terraform","terraform-module","tfsec"],"created_at":"2024-12-25T10:18:30.316Z","updated_at":"2025-05-12T15:51:06.011Z","avatar_url":"https://github.com/k-candidate.png","language":"HCL","readme":"# tf-module-dynamodb\n\n![Flow chart of how this works](/docs/assets/images/db.jpg)\n\n- This has been made locally using localstack.\n- To deploy, you can use a file `main.tf` with the following content:\n```\nmodule \"tf-module-dynamodb\" {\n  source        = \"git@github.com:k-candidate/tf-module-dynamodb.git\"\n  table_name    = \"tf-test\"\n  hash_key      = \"id\"\n  hash_key_type = \"N\"\n  range_key     = \"name\"\n  alias         = \"mykey\"\n}\n```\n- A GHA has been put in place to generate the docs for tf below.\n\n\n### This a simple PoC. Possible improvements:\n- [ ] If we are given data with defined schema, Aurora Serverless v2 would be the go-to solution, but it is not available in the community version of localstack. However DynamoDB is.\n- [x] Locally, use `tfsec` to scan the tf code before making the commit. Or put it in the CD flow (possible to soft or hard fail). **DONE**: Added GitHub Action that will comment inside PRs using tfsec's output.\n- [ ] Have a S3 bucket as backend to store the tf state.\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\nNo requirements.\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_archive\"\u003e\u003c/a\u003e [archive](#provider\\_archive) | n/a |\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | n/a |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_dynamodb_table.dynamodb-table](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dynamodb_table) | resource |\n| [aws_iam_role.iam_for_lambda_tf](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |\n| [aws_kms_alias.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_alias) | resource |\n| [aws_kms_key.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource |\n| [aws_lambda_event_source_mapping.lambda_sqs_trigger](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_event_source_mapping) | resource |\n| [aws_lambda_function.insert-into-dynamodb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |\n| [aws_sqs_queue.dev-sqs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |\n| [aws_ssm_parameter.foo](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource |\n| [archive_file.lambda](https://registry.terraform.io/providers/hashicorp/archive/latest/docs/data-sources/file) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_alias\"\u003e\u003c/a\u003e [alias](#input\\_alias) | n/a | `string` | `\"tf-cmk\"` | no |\n| \u003ca name=\"input_hash_key\"\u003e\u003c/a\u003e [hash\\_key](#input\\_hash\\_key) | n/a | `string` | `\"UserId\"` | no |\n| \u003ca name=\"input_hash_key_type\"\u003e\u003c/a\u003e [hash\\_key\\_type](#input\\_hash\\_key\\_type) | n/a | `string` | `\"S\"` | no |\n| \u003ca name=\"input_key_spec\"\u003e\u003c/a\u003e [key\\_spec](#input\\_key\\_spec) | n/a | `string` | `\"SYMMETRIC_DEFAULT\"` | no |\n| \u003ca name=\"input_range_key\"\u003e\u003c/a\u003e [range\\_key](#input\\_range\\_key) | n/a | `string` | `\"FullName\"` | no |\n| \u003ca name=\"input_range_key_type\"\u003e\u003c/a\u003e [range\\_key\\_type](#input\\_range\\_key\\_type) | n/a | `string` | `\"S\"` | no |\n| \u003ca name=\"input_read_capacity\"\u003e\u003c/a\u003e [read\\_capacity](#input\\_read\\_capacity) | n/a | `number` | `5` | no |\n| \u003ca name=\"input_table_name\"\u003e\u003c/a\u003e [table\\_name](#input\\_table\\_name) | n/a | `string` | n/a | yes |\n| \u003ca name=\"input_write_capacity\"\u003e\u003c/a\u003e [write\\_capacity](#input\\_write\\_capacity) | n/a | `number` | `5` | no |\n\n## Outputs\n\nNo outputs.\n\u003c!-- END_TF_DOCS --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-candidate%2Ftf-module-dynamodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk-candidate%2Ftf-module-dynamodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-candidate%2Ftf-module-dynamodb/lists"}