{"id":15878892,"url":"https://github.com/gr1m0h/terraform-backend-setup-scripts","last_synced_at":"2026-05-07T08:38:33.974Z","repository":{"id":115461620,"uuid":"208230430","full_name":"gr1m0h/terraform-backend-setup-scripts","owner":"gr1m0h","description":"Initialize Terraform S3 backend using CloudFormation.","archived":false,"fork":false,"pushed_at":"2020-03-29T09:28:05.000Z","size":4,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T15:32:57.689Z","etag":null,"topics":["aws","backend","dynamodb","infrastructure","infrastructure-as-code","s3","terraform"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/gr1m0h.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}},"created_at":"2019-09-13T09:05:21.000Z","updated_at":"2022-11-14T17:07:26.000Z","dependencies_parsed_at":"2023-12-01T06:40:25.991Z","dependency_job_id":null,"html_url":"https://github.com/gr1m0h/terraform-backend-setup-scripts","commit_stats":null,"previous_names":["gr1m0h/terraform-backend-setup-scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr1m0h%2Fterraform-backend-setup-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr1m0h%2Fterraform-backend-setup-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr1m0h%2Fterraform-backend-setup-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr1m0h%2Fterraform-backend-setup-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr1m0h","download_url":"https://codeload.github.com/gr1m0h/terraform-backend-setup-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246730260,"owners_count":20824396,"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":["aws","backend","dynamodb","infrastructure","infrastructure-as-code","s3","terraform"],"created_at":"2024-10-06T02:42:14.342Z","updated_at":"2026-05-07T08:38:33.927Z","avatar_url":"https://github.com/gr1m0h.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-backend-setup-scripts\n## Description\nBuild Terraform backend without using Terraform.\n\nhttps://www.terraform.io/docs/backends/types/s3.html\n\u003e Terraform is an administrative tool that manages your infrastructure, and so ideally the infrastructure that is used by Terraform should exist outside of the infrastructure that Terraform manages. This can be achieved by creating a separate administrative AWS account which contains the user accounts used by human operators and any infrastructure and tools used to manage the other accounts. Isolating shared administrative tools from your main environments has a number of advantages, such as avoiding accidentally damaging the administrative infrastructure while changing the target infrastructure, and reducing the risk that an attacker might abuse production infrastructure to gain access to the (usually more privileged) administrative infrastructure.\n\n## Usage\n1. Run init.sh\n\n    ```sh\n    $ bash init.sh \u003cSTACK_NAME\u003e \u003cS3_BUCKET_NAME\u003e \u003cDYNAMODB_TABLE_NAME\u003e\n    ```\n\n1. terraform init\n\n    ```sh\n    $ terraform init \\\n      -backend-config=\"bucket=\u003cS3_BUCKET_NAME\u003e\" \\\n      -backend-config=\"dynamodb_table=\u003cDYNAMODB_TABLE_NAME\u003e\"\n    ```\n\n### When removing the Terraform backend\n\n  ```sh\n  $ aws cloudformation delete-stack --stack-name \u003cSTACK_NAME\u003e\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr1m0h%2Fterraform-backend-setup-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr1m0h%2Fterraform-backend-setup-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr1m0h%2Fterraform-backend-setup-scripts/lists"}