You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform module to provision an S3 bucket to store `terraform.tfstate` file and a DynamoDB table to lock the state file
@@ -57,20 +57,21 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are
57
57
58
58
## Usage
59
59
60
+
61
+
**IMPORTANT:** The `master` branch is used in `source` just as an example. In your code, do not pin to `master` because there may be breaking changes between releases.
62
+
Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-aws-tfstate-backend/releases).
63
+
64
+
60
65
1. Define the module in your `.tf` file using local state:
| block_public_acls | Whether Amazon S3 should block public ACLs for this bucket |bool|`true`| no |
126
+
| block_public_policy | Whether Amazon S3 should block public bucket policies for this bucket | string |`true`| no |
127
+
| context | Default context to use for passing state between label invocations |object|`<map>`| no |
130
128
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`| string |`-`| no |
131
-
| enable_server_side_encryption | Enable DynamoDB server-side encryption |string|`true`| no |
129
+
| enable_server_side_encryption | Enable DynamoDB server-side encryption |bool|`true`| no |
132
130
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
133
-
| force_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable |string|`false`| no |
134
-
| ignore_public_acls | Whether Amazon S3 should ignore public ACLs for this bucket.|string|`false`| no |
135
-
| label_order | The naming order of the id output and Name tag | list |`<list>`| no |
136
-
| mfa_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) |string|`false`| no |
131
+
| force_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable |bool|`false`| no |
132
+
| ignore_public_acls | Whether Amazon S3 should ignore public ACLs for this bucket |bool|`true`| no |
133
+
| label_order | The naming order of the id output and Name tag | list(string)|`<list>`| no |
134
+
| mfa_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) |bool|`false`| no |
137
135
| name | Solution name, e.g. 'app' or 'jenkins' | string |`terraform`| no |
138
136
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | string | `` | no |
139
-
| prevent_unencrypted_uploads | Prevent uploads of unencrypted objects to S3 |string|`true`| no |
137
+
| prevent_unencrypted_uploads | Prevent uploads of unencrypted objects to S3 |bool|`true`| no |
140
138
| profile | AWS profile name as set in the shared credentials file | string | `` | no |
141
139
| read_capacity | DynamoDB read capacity units | string |`5`| no |
142
140
| regex_replace_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed | string |`/[^a-zA-Z0-9-]/`| no |
143
141
| region | AWS Region the S3 bucket should reside in | string | - | yes |
144
-
| restrict_public_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket.|string|`false`| no |
142
+
| restrict_public_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket |bool|`true`| no |
145
143
| role_arn | The role to be assumed | string | `` | no |
146
144
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | string | `` | no |
| block_public_acls | Whether Amazon S3 should block public ACLs for this bucket |bool|`true`| no |
9
+
| block_public_policy | Whether Amazon S3 should block public bucket policies for this bucket | string |`true`| no |
10
+
| context | Default context to use for passing state between label invocations |object|`<map>`| no |
11
11
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`| string |`-`| no |
12
-
| enable_server_side_encryption | Enable DynamoDB server-side encryption |string|`true`| no |
12
+
| enable_server_side_encryption | Enable DynamoDB server-side encryption |bool|`true`| no |
13
13
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
14
-
| force_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable |string|`false`| no |
15
-
| ignore_public_acls | Whether Amazon S3 should ignore public ACLs for this bucket.|string|`false`| no |
16
-
| label_order | The naming order of the id output and Name tag | list |`<list>`| no |
17
-
| mfa_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) |string|`false`| no |
14
+
| force_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable |bool|`false`| no |
15
+
| ignore_public_acls | Whether Amazon S3 should ignore public ACLs for this bucket |bool|`true`| no |
16
+
| label_order | The naming order of the id output and Name tag | list(string)|`<list>`| no |
17
+
| mfa_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) |bool|`false`| no |
18
18
| name | Solution name, e.g. 'app' or 'jenkins' | string |`terraform`| no |
19
19
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | string | `` | no |
20
-
| prevent_unencrypted_uploads | Prevent uploads of unencrypted objects to S3 |string|`true`| no |
20
+
| prevent_unencrypted_uploads | Prevent uploads of unencrypted objects to S3 |bool|`true`| no |
21
21
| profile | AWS profile name as set in the shared credentials file | string | `` | no |
22
22
| read_capacity | DynamoDB read capacity units | string |`5`| no |
23
23
| regex_replace_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed | string |`/[^a-zA-Z0-9-]/`| no |
24
24
| region | AWS Region the S3 bucket should reside in | string | - | yes |
25
-
| restrict_public_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket.|string|`false`| no |
25
+
| restrict_public_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket |bool|`true`| no |
26
26
| role_arn | The role to be assumed | string | `` | no |
27
27
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | string | `` | no |
0 commit comments