Skip to content

Commit b11e7c8

Browse files
terraform-docs: automated action
1 parent b9dab4b commit b11e7c8

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

modules/s3-bucket/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
# s3-bucket
3+
4+
This sub-module creates an S3 bucket with optional S3 bucket policies to attach.
5+
6+
## Presets
7+
8+
### S3 Bucket
9+
10+
- The `force_destroy` is set to `false` as the default option (which prevents the deletion of the S3 bucket if it has objects in it), and can be overridden to be `true`.
11+
12+
### S3 Bucket Policy
13+
14+
- The `effect` under `statement` in the `aws_iam_policy_document.this` data source is set to `Allow` as the default option (which grants the principal the defined permissions), and can be overridden to be `Deny`.
15+
16+
## Notes
17+
18+
- The S3 bucket policies are attached only if at least one policy is specified. Otherwise, no bucket policies are attached.
19+
20+
## Requirements
21+
22+
| Name | Version |
23+
|------|---------|
24+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6.0 |
25+
26+
## Providers
27+
28+
| Name | Version |
29+
|------|---------|
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
31+
32+
## Modules
33+
34+
No modules.
35+
36+
## Resources
37+
38+
| Name | Type |
39+
|------|------|
40+
| [aws_s3_bucket.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
41+
| [aws_s3_bucket_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |
42+
| [aws_iam_policy_document.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
43+
44+
## Inputs
45+
46+
| Name | Description | Type | Default | Required |
47+
|------|-------------|------|---------|:--------:|
48+
| <a name="input_bucket"></a> [bucket](#input\_bucket) | (Optional, Forces new resource) Name of the bucket. | `string` | `null` | no |
49+
| <a name="input_bucket_force_destroy"></a> [bucket\_force\_destroy](#input\_bucket\_force\_destroy) | (Optional, Default:false) Boolean that indicates all objects (including any locked objects) should be deleted from the bucket when the bucket is destroyed so that the bucket can be destroyed without error. | `bool` | `false` | no |
50+
| <a name="input_bucket_object_lock_enabled"></a> [bucket\_object\_lock\_enabled](#input\_bucket\_object\_lock\_enabled) | (Optional, Forces new resource) Indicates whether this bucket has an Object Lock configuration enabled. | `bool` | `false` | no |
51+
| <a name="input_bucket_policies"></a> [bucket\_policies](#input\_bucket\_policies) | (Optional) Map of bucket policies to attach to the S3 bucket. | <pre>map(object({<br> id = optional(string, null)<br> version = optional(string, null)<br> statements = optional(list(object({<br> actions = optional(set(string), [])<br> effect = optional(string, "Allow")<br> resources = optional(set(string), [])<br> principals = optional(list(object({<br> identifiers = set(string)<br> type = string<br> })), [])<br> })), [])<br> }))</pre> | `{}` | no |
52+
| <a name="input_tags"></a> [tags](#input\_tags) | (Optional) Map of tags to assign to the bucket. | `map(string)` | `{}` | no |
53+
54+
## Outputs
55+
56+
| Name | Description |
57+
|------|-------------|
58+
| <a name="output_bucket_arn"></a> [bucket\_arn](#output\_bucket\_arn) | ARN of the bucket. |
59+
| <a name="output_bucket_id"></a> [bucket\_id](#output\_bucket\_id) | Name of the bucket. |
60+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)