|
1 | 1 | # terraform-aws-backend
|
2 |
| -[](https://github.com/rhythmictech/terraform-aws-backend/actions) <a href="https://twitter.com/intent/follow?screen_name=RhythmicTech"><img src="https://img.shields.io/twitter/follow/RhythmicTech?style=social&logo=RhythmicTech" alt="follow on Twitter"></a> |
| 2 | + |
| 3 | +[](https://github.com/rhythmictech/terraform-aws-backend/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster) |
| 4 | +[](https://github.com/rhythmictech/terraform-aws-backend/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster) |
| 5 | +[](https://github.com/rhythmictech/terraform-aws-backend/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster) |
| 6 | +[](https://github.com/rhythmictech/terraform-aws-backend/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster) |
| 7 | +[](https://github.com/rhythmictech/terraform-aws-backend/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster) |
| 8 | +<a href="https://twitter.com/intent/follow?screen_name=RhythmicTech"><img src="https://img.shields.io/twitter/follow/RhythmicTech?style=social&logo=twitter" alt="follow on Twitter"></a> |
3 | 9 |
|
4 | 10 | Creates a backend S3 bucket and DynamoDB table for managing Terraform state. Useful for bootstrapping a new
|
5 | 11 | environment. This module supports cross-account state management, using a centralized account that holds the S3 bucket and KMS key.
|
@@ -58,34 +64,51 @@ region = "us-east-1"
|
58 | 64 |
|
59 | 65 | | Name | Version |
|
60 | 66 | |------|---------|
|
61 |
| -| terraform | >= 0.13 | |
62 |
| -| aws | ~> 3.15.0 | |
| 67 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 | |
| 68 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.15.0 | |
63 | 69 |
|
64 | 70 | ## Providers
|
65 | 71 |
|
66 | 72 | | Name | Version |
|
67 | 73 | |------|---------|
|
68 |
| -| aws | ~> 3.15.0 | |
| 74 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.15.0 | |
| 75 | + |
| 76 | +## Modules |
| 77 | + |
| 78 | +No modules. |
| 79 | + |
| 80 | +## Resources |
| 81 | + |
| 82 | +| Name | Type | |
| 83 | +|------|------| |
| 84 | +| [aws_dynamodb_table.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dynamodb_table) | resource | |
| 85 | +| [aws_kms_alias.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_alias) | resource | |
| 86 | +| [aws_kms_key.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource | |
| 87 | +| [aws_s3_bucket.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource | |
| 88 | +| [aws_s3_bucket_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource | |
| 89 | +| [aws_s3_bucket_public_access_block.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource | |
| 90 | +| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | |
| 91 | +| [aws_iam_policy_document.key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | |
| 92 | +| [aws_iam_policy_document.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | |
69 | 93 |
|
70 | 94 | ## Inputs
|
71 | 95 |
|
72 | 96 | | Name | Description | Type | Default | Required |
|
73 | 97 | |------|-------------|------|---------|:--------:|
|
74 |
| -| allowed\_account\_ids | Account IDs that are allowed to access the bucket/KMS key | `list(string)` | `[]` | no | |
75 |
| -| bucket | Name of bucket to create (do not provide if using `remote_bucket`) | `string` | `""` | no | |
76 |
| -| kms\_alias\_name | Name of KMS Alias | `string` | `""` | no | |
77 |
| -| kms\_key\_id | ARN for KMS key for all encryption operations. | `string` | `""` | no | |
78 |
| -| logging\_target\_bucket | The name of the bucket that will receive the log objects | `string` | `null` | no | |
79 |
| -| logging\_target\_prefix | A key prefix for log objects | `string` | `"TFStateLogs/"` | no | |
80 |
| -| remote\_bucket | If specified, the remote bucket will be used for the backend. A new bucket will not be created | `string` | `""` | no | |
81 |
| -| table | Name of Dynamo Table to create | `string` | `"tf-locktable"` | no | |
82 |
| -| tags | Mapping of any extra tags you want added to resources | `map(string)` | `{}` | no | |
| 98 | +| <a name="input_allowed_account_ids"></a> [allowed\_account\_ids](#input\_allowed\_account\_ids) | Account IDs that are allowed to access the bucket/KMS key | `list(string)` | `[]` | no | |
| 99 | +| <a name="input_bucket"></a> [bucket](#input\_bucket) | Name of bucket to create (do not provide if using `remote_bucket`) | `string` | `""` | no | |
| 100 | +| <a name="input_kms_alias_name"></a> [kms\_alias\_name](#input\_kms\_alias\_name) | Name of KMS Alias | `string` | `""` | no | |
| 101 | +| <a name="input_kms_key_id"></a> [kms\_key\_id](#input\_kms\_key\_id) | ARN for KMS key for all encryption operations. | `string` | `""` | no | |
| 102 | +| <a name="input_logging_target_bucket"></a> [logging\_target\_bucket](#input\_logging\_target\_bucket) | The name of the bucket that will receive the log objects | `string` | `null` | no | |
| 103 | +| <a name="input_logging_target_prefix"></a> [logging\_target\_prefix](#input\_logging\_target\_prefix) | A key prefix for log objects | `string` | `"TFStateLogs/"` | no | |
| 104 | +| <a name="input_remote_bucket"></a> [remote\_bucket](#input\_remote\_bucket) | If specified, the remote bucket will be used for the backend. A new bucket will not be created | `string` | `""` | no | |
| 105 | +| <a name="input_table"></a> [table](#input\_table) | Name of Dynamo Table to create | `string` | `"tf-locktable"` | no | |
| 106 | +| <a name="input_tags"></a> [tags](#input\_tags) | Mapping of any extra tags you want added to resources | `map(string)` | `{}` | no | |
83 | 107 |
|
84 | 108 | ## Outputs
|
85 | 109 |
|
86 | 110 | | Name | Description |
|
87 | 111 | |------|-------------|
|
88 |
| -| kms\_key\_arn | ARN of KMS Key for S3 bucket | |
89 |
| -| s3\_bucket\_backend | S3 bucket | |
90 |
| - |
| 112 | +| <a name="output_kms_key_arn"></a> [kms\_key\_arn](#output\_kms\_key\_arn) | ARN of KMS Key for S3 bucket | |
| 113 | +| <a name="output_s3_bucket_backend"></a> [s3\_bucket\_backend](#output\_s3\_bucket\_backend) | S3 bucket | |
91 | 114 | <!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|
0 commit comments