Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/infraspecdev/terraform-aws-s3-dynamodb-backend
https://github.com/infraspecdev/terraform-aws-s3-dynamodb-backend
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/infraspecdev/terraform-aws-s3-dynamodb-backend
- Owner: infraspecdev
- License: mit
- Created: 2024-07-09T19:36:28.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-14T09:55:24.000Z (about 2 months ago)
- Last Synced: 2024-11-14T10:36:09.442Z (about 2 months ago)
- Language: HCL
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# terraform-aws-s3-dynamodb-backend
This module creates an S3 bucket and a DynamoDB table, which can be used to store Terraform state files and lock state files to prevent concurrent modifications.
## Usage
To use this module, include it in your Terraform configuration like this:
```hcl
module "tf_state_backend" {
source = "github.com/infraspecdev/terraform-aws-s3-dynamodb-backend?ref=main"s3_bucket_name = "unique-s3-bucket-name"
dynamodb_table_name = "unique_dynamodb_table"
dynamodb_read_capacity = 21
dynamodb_write_capacity = 21
dynamodb_table_tags = {
Environment = "dev"
Project = "backend"
}
s3_bucket_tags = {
Environment = "dev"
Project = "backend"
}
}
```## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.4.6 |
| [aws](#requirement\_aws) | >= 4.65.0 |## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| [dynamodb\_tf\_state\_lock](#module\_dynamodb\_tf\_state\_lock) | ./modules/dynamodb_table | n/a |
| [tf\_state\_s3\_bucket](#module\_tf\_state\_s3\_bucket) | ./modules/s3 | n/a |## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [dynamodb\_read\_capacity](#input\_dynamodb\_read\_capacity) | (Optional) Number of read units for this table. | `number` | `20` | no |
| [dynamodb\_table\_name](#input\_dynamodb\_table\_name) | (Required) Unique Table name within a region name of the table | `string` | n/a | yes |
| [dynamodb\_table\_tags](#input\_dynamodb\_table\_tags) | (Optional) A map of tags to populate on the created table. | `map(string)` | `{}` | no |
| [dynamodb\_write\_capacity](#input\_dynamodb\_write\_capacity) | (Optional) Number of write units for this table. | `number` | `20` | no |
| [s3\_bucket\_name](#input\_s3\_bucket\_name) | Name of the bucket. If omitted, Terraform will assign a random, unique name. | `string` | n/a | yes |
| [s3\_bucket\_tags](#input\_s3\_bucket\_tags) | (Optional) Map of tags to assign to the bucket. | `map(string)` | `{}` | no |## Outputs
No outputs.