https://github.com/dfds/aws-modules-s3
https://github.com/dfds/aws-modules-s3
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dfds/aws-modules-s3
- Owner: dfds
- License: gpl-3.0
- Created: 2023-02-02T11:13:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-10T13:52:47.000Z (7 months ago)
- Last Synced: 2025-12-10T21:51:53.378Z (7 months ago)
- Language: HCL
- Size: 52.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-modules-s3
Module for AWS S3 bucket
# Documentation
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.6.0 |
| [aws](#requirement\_aws) | >= 6.23.0 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 6.23.0 |
## Modules
| Name | Source | Version |
|------|--------|---------|
| [logging\_bucket](#module\_logging\_bucket) | ./s3-logging-bucket | n/a |
## Resources
| Name | Type |
|------|------|
| [aws_s3_bucket.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket_lifecycle_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
| [aws_s3_bucket_logging.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_logging) | resource |
| [aws_s3_bucket_ownership_controls.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_ownership_controls) | resource |
| [aws_s3_bucket_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |
| [aws_s3_bucket_public_access_block.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |
| [aws_s3_bucket_server_side_encryption_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource |
| [aws_s3_bucket_versioning.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_versioning) | resource |
| [aws_iam_policy_document.bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [additional\_tags](#input\_additional\_tags) | Additional tags for the S3 bucket | `object({})` | `{}` | no |
| [bucket\_name](#input\_bucket\_name) | Name of the S3 bucket | `string` | n/a | yes |
| [bucket\_versioning\_configuration](#input\_bucket\_versioning\_configuration) | Whether to enable bucket versioning | `string` | `"Enabled"` | no |
| [create\_logging\_bucket](#input\_create\_logging\_bucket) | Whether to create logging bucket | `bool` | `false` | no |
| [create\_policy](#input\_create\_policy) | Whether to create a bucket policy | `bool` | `true` | no |
| [kms\_key\_arn](#input\_kms\_key\_arn) | ARN of the KMS key to use for server side encryption | `string` | `null` | no |
| [lifecycle\_rules](#input\_lifecycle\_rules) | List of objects lifecycle rules |
list(object({
abort_incomplete_multipart_upload = optional(object({
days_after_initiation = optional(number)
}))
expiration = optional(object({
date = optional(string)
days = optional(number)
}))
filter = optional(object({
and = optional(object({
object_size_greater_than = optional(number)
object_size_less_than = optional(number)
prefix = optional(string)
tags = optional(map(string))
}))
object_size_greater_than = optional(number)
object_size_less_than = optional(number)
prefix = optional(string)
tag = optional(object({
key = optional(string)
value = optional(string)
}))
}))
id = string
noncurrent_version_expiration = optional(object({
newer_noncurrent_versions = optional(number)
noncurrent_days = optional(number)
}))
noncurrent_version_transition = optional(object({
newer_noncurrent_versions = optional(number)
noncurrent_days = optional(number)
storage_class = string
}))
status = string
transition = optional(object({
date = optional(string)
days = optional(number)
storage_class = optional(string)
}))
})) | `[]` | no |
| [logging\_bucket\_lifecycle\_rules](#input\_logging\_bucket\_lifecycle\_rules) | List of objects lifecycle rules | list(object({
abort_incomplete_multipart_upload = optional(object({
days_after_initiation = optional(number)
}))
expiration = optional(object({
date = optional(string)
days = optional(number)
}))
filter = optional(object({
and = optional(object({
object_size_greater_than = optional(number)
object_size_less_than = optional(number)
prefix = optional(string)
tags = optional(map(string))
}))
object_size_greater_than = optional(number)
object_size_less_than = optional(number)
prefix = optional(string)
tag = optional(object({
key = optional(string)
value = optional(string)
}))
}))
id = string
noncurrent_version_expiration = optional(object({
newer_noncurrent_versions = optional(number)
noncurrent_days = optional(number)
}))
noncurrent_version_transition = optional(object({
newer_noncurrent_versions = optional(number)
noncurrent_days = optional(number)
storage_class = string
}))
status = string
transition = optional(object({
date = optional(string)
days = optional(number)
storage_class = optional(string)
}))
})) | `[]` | no |
| [logging\_bucket\_name](#input\_logging\_bucket\_name) | Name of the S3 bucket for logs. Either an existing logging bucket or the name of the bucket to be created | `string` | n/a | yes |
| [object\_ownership](#input\_object\_ownership) | Object ownership. Valid values: `BucketOwnerPreferred`, `ObjectWriter` or `BucketOwnerEnforced` | `string` | `"BucketOwnerEnforced"` | no |
| [override\_policy\_documents](#input\_override\_policy\_documents) | List of IAM policy documents that are merged together into the exported document. It will will iteratively override matching Sids | `list(string)` | `[]` | no |
| [source\_policy\_documents](#input\_source\_policy\_documents) | List of IAM policy documents that are merged together into the exported document. It requires that all documents have unique Sids | `list(string)` | `[]` | no |
## Outputs
| Name | Description |
|------|-------------|
| [bucket\_arn](#output\_bucket\_arn) | ARN of the S3 bucket |
| [bucket\_domain\_name](#output\_bucket\_domain\_name) | The bucket domain name. Will be of format `bucketname.s3.amazonaws.com` |
| [bucket\_name](#output\_bucket\_name) | Name of the bucket |