{"id":26009980,"url":"https://github.com/byu-oit/terraform-aws-backend-s3","last_synced_at":"2025-03-05T22:26:46.614Z","repository":{"id":47176437,"uuid":"224519742","full_name":"byu-oit/terraform-aws-backend-s3","owner":"byu-oit","description":"Terraform module that creates an S3 bucket and DynamoDB table for backend state files","archived":false,"fork":false,"pushed_at":"2023-07-14T17:37:51.000Z","size":38,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":22,"default_branch":"main","last_synced_at":"2024-04-14T06:10:00.605Z","etag":null,"topics":["terraform-module","tool"],"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/byu-oit.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}},"created_at":"2019-11-27T21:27:35.000Z","updated_at":"2024-01-12T18:11:08.000Z","dependencies_parsed_at":"2023-01-28T01:16:27.653Z","dependency_job_id":null,"html_url":"https://github.com/byu-oit/terraform-aws-backend-s3","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-backend-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-backend-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-backend-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-backend-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byu-oit","download_url":"https://codeload.github.com/byu-oit/terraform-aws-backend-s3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242112782,"owners_count":20073669,"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":["terraform-module","tool"],"created_at":"2025-03-05T22:26:45.974Z","updated_at":"2025-03-05T22:26:46.603Z","avatar_url":"https://github.com/byu-oit.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform AWS Backend S3\nTerraform module that creates an S3 bucket and DynamoDB table for backend state files.\n\n## Quickstart\n\nThis is one of the few modules that you can just run \"as is\" and then throw away the config and state.\n\n```sh\ngit clone https://github.com/byu-oit/terraform-aws-backend-s3.git\ncd terraform-aws-backend-s3/examples/simple\naws sso login\nexport AWS_PROFILE=my-account-profile\nterraform init\nterraform apply\ncd ../../../\nrm -rf terraform-aws-backend-s3\n```\n\n## Usage\n```hcl\nmodule \"backend-s3\" {\n  source = \"github.com/byu-oit/terraform-aws-backend-s3?ref=v2.0.0\"\n}\n```\n\nRun `terraform apply` to create the S3 bucket and DynamoDB table for storing state files. Then add:\n```hcl\nterraform {\n  backend \"s3\" {\n    bucket          = \"terraform-state-storage-\u003caccount_number\u003e\"\n    dynamodb_table  = \"terraform-state-lock-\u003caccount_number\u003e\"\n    key             = \"my-cool-app.tfstate\"\n    region          = \"us-west-2\"\n  }\n}\n```\nto configure your terraform backend to the newly created S3 bucket and DynamoDB table.\n\n\n## Input\n| Variable            | Default                                  | Description                                |\n|---------------------|------------------------------------------|--------------------------------------------|\n| bucket_name         | terraform-state-storage-\u003caccount_number\u003e | S3 bucket name for state file storage      |\n| dynamodb_table_name | terraform-state-lock-\u003caccount_number\u003e    | DynamoDB table name for state file locking |\n\n## Output\n| Name           | Description                                                                                                                                    |\n|----------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| s3_bucket      | S3 bucket [object](https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#attributes-reference) for terraform state storage              |\n| s3_bucket_name | Bucket name of the `s3_bucket`                                                                                                                 |\n| dynamodb_table | DynamoDB Table [object](https://www.terraform.io/docs/providers/aws/r/dynamodb_table.html#attributes-reference) for locking of terraform state |\n\n**Note about returning objects:** Because objects are returned (as opposed to just values), autocomplete may not work. \nJust add on the key to the end out the output accessor. Even though autocomplete won't work, those values will still be \ncorrectly returned.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyu-oit%2Fterraform-aws-backend-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyu-oit%2Fterraform-aws-backend-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyu-oit%2Fterraform-aws-backend-s3/lists"}