{"id":22347721,"url":"https://github.com/wearetechnative/terraform-aws-module-terraform-backend","last_synced_at":"2026-02-02T05:36:47.452Z","repository":{"id":262603483,"uuid":"706896488","full_name":"wearetechnative/terraform-aws-module-terraform-backend","owner":"wearetechnative","description":"Module to setup Terraform backend","archived":false,"fork":false,"pushed_at":"2025-01-14T12:49:35.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T10:48:35.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","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/wearetechnative.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-10-18T20:39:21.000Z","updated_at":"2025-01-14T12:49:39.000Z","dependencies_parsed_at":"2025-03-26T10:53:30.644Z","dependency_job_id":null,"html_url":"https://github.com/wearetechnative/terraform-aws-module-terraform-backend","commit_stats":null,"previous_names":["wearetechnative/terraform-aws-module-terraform-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wearetechnative/terraform-aws-module-terraform-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-module-terraform-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-module-terraform-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-module-terraform-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-module-terraform-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wearetechnative","download_url":"https://codeload.github.com/wearetechnative/terraform-aws-module-terraform-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-module-terraform-backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261110612,"owners_count":23111064,"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-12-04T10:10:38.770Z","updated_at":"2026-02-02T05:36:42.418Z","avatar_url":"https://github.com/wearetechnative.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform AWS [Terraform Backend]\n\nAn S3 bucket with DynamoDB compatible for use as a Terraform Backend.\n\nThis module mostly enforces safe and known best practices:\n- Use our S3 module with locked down permissions.\n- Setup DynamoDB compatible for use in backend and using PAY PER REQUEST to minize cost.\n\nIn case multiple Terraform projects are used on the same account they should be differentiated by `var.name`. Creating seperate modules increases seperation without increasing cost because all resources are either pay per use by default (S3) or configured to do so (DynamoDB).\n\nThe KMS key should be provided externally as these incur a monthly 1 dollar cost. See `var.kms_key_arn` for this.\n\n[![](we-are-technative.png)](https://www.technative.nl)\n\n## How does it work\n\n### First use when you cloned this repository\n\nRun `pre-commit install` to install any guardrails implemented using pre-commit.\n\nSee [pre-commit installation](https://pre-commit.com/#install) on how to install pre-commit.\n\n## Usage\n\nThis backendrole provides the TerraForm backend dynamodb and S3 bucket.\n\nThe role is used for any cross-account setups but should also be used for any inaccount setups as well when possible. Currently our landing-zone depends on this module. But we will also use if for stack accounts and perhaps later for inaccount landingzones as well.\n\nTo use this module:\n1. The S3 bucket name is provided by the output `terraform_backend_s3_id`.\n2. The DynamoDB name is provided by the output `terraform_backend_dynamodb_name`.\n\nExample backend.tf file:\n\nReplace `bucket` and `dynamodb_table` accordingly. Set `role_arn` to same role as your account provider.\n\n```ruby\nterraform {\n  backend \"s3\" {\n    role_arn     = \"arn:aws:iam::\u003caccount_id\u003e:role/OrganizationAccountAccessRole\"\n    session_name = \"TerraformStateUpdate\"\n\n    bucket = \"See step 1)\"\n    key    = \"terraform.tf\"\n    region = \"eu-central-1\"\n\n    dynamodb_table = \"See step 2)\"\n  }\n}\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | 4.57.0 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_backend\"\u003e\u003c/a\u003e [backend](#module\\_backend) | git@github.com:TechNative-B-V/terraform-aws-module-s3.git/ | 3b39341b8f0ca25423f97ed3107411d6a4c6493f |\n| \u003ca name=\"module_state_lock\"\u003e\u003c/a\u003e [state\\_lock](#module\\_state\\_lock) | git@github.com:TechNative-B-V/terraform-aws-module-dynamodb.git/ | 5fb90ad50328a36290b6572d5b56e9ff691e4385 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_kms_key_arn\"\u003e\u003c/a\u003e [kms\\_key\\_arn](#input\\_kms\\_key\\_arn) | KMS key to use for encrypting EBS volumes. | `string` | `null` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name to allow this module to be deployed multiple times in the same account. | `string` | `\"\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_terraform_backend_dynamodb_name\"\u003e\u003c/a\u003e [terraform\\_backend\\_dynamodb\\_name](#output\\_terraform\\_backend\\_dynamodb\\_name) | n/a |\n| \u003ca name=\"output_terraform_backend_s3_id\"\u003e\u003c/a\u003e [terraform\\_backend\\_s3\\_id](#output\\_terraform\\_backend\\_s3\\_id) | n/a |\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-aws-module-terraform-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwearetechnative%2Fterraform-aws-module-terraform-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-aws-module-terraform-backend/lists"}