{"id":19508802,"url":"https://github.com/rhythmictech/terraform-aws-s3logging-bucket","last_synced_at":"2025-04-26T03:31:46.047Z","repository":{"id":43319934,"uuid":"189904699","full_name":"rhythmictech/terraform-aws-s3logging-bucket","owner":"rhythmictech","description":"Create and manage a bucket suitable for access logging for other S3 buckets.","archived":false,"fork":false,"pushed_at":"2025-03-08T15:46:47.000Z","size":39,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T07:11:19.725Z","etag":null,"topics":["aws","aws-s3","logging","terraform","terraform-module","terraform-modules"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/rhythmictech/s3logging-bucket/aws","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhythmictech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-02T23:17:14.000Z","updated_at":"2025-03-08T15:44:24.000Z","dependencies_parsed_at":"2024-06-14T22:53:15.073Z","dependency_job_id":"6ff69dbe-6b2f-46e5-805d-545032553c90","html_url":"https://github.com/rhythmictech/terraform-aws-s3logging-bucket","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-s3logging-bucket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-s3logging-bucket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-s3logging-bucket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-s3logging-bucket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhythmictech","download_url":"https://codeload.github.com/rhythmictech/terraform-aws-s3logging-bucket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250926812,"owners_count":21509041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-s3","logging","terraform","terraform-module","terraform-modules"],"created_at":"2024-11-10T23:09:56.228Z","updated_at":"2025-04-26T03:31:46.037Z","avatar_url":"https://github.com/rhythmictech.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-s3logging-bucket\n[![tflint](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions/workflows/tflint.yaml/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster)\n[![tfsec](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions/workflows/tfsec.yaml/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster)\n[![yamllint](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions/workflows/yamllint.yaml/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster)\n[![misspell](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions/workflows/misspell.yaml/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster)\n[![pre-commit-check](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions/workflows/pre-commit.yaml/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-s3logging-bucket/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster)\n![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/RhythmicTech)\n\n\nCreate and manage a bucket suitable for access logging for other S3 buckets.\n\n\n## Usage\nBasic usage:\n```\nmodule \"s3logging-bucket\" {\n  source = \"rhythmictech/s3logging-bucket/aws\"\n}\n```\n\nCombine with other S3-based modules, like our cloudtrail bucket module:\n```\nmodule \"s3logging-bucket\" {\n  source = \"rhythmictech/s3logging-bucket/aws\"\n  version = \"3.3.0\"\n}\n\nmodule \"cloudtrail-bucket\" {\n  source         = \"git::https://github.com/rhythmictech/terraform-aws-cloudtrail-bucket?ref=v4.0.0\"\n\n  logging_bucket      = module.s3logging-bucket.s3_bucket_name\n  region              = var.region\n}\n\nmodule \"cloudtrail-logging\" {\n  source            = \"git::https://github.com/rhythmictech/terraform-aws-cloudtrail-logging?ref=v1.3.0\"\n\n  cloudtrail_bucket = module.cloudtrail-bucket.s3_bucket_name\n  kms_key_id        = module.cloudtrail-bucket.kms_key_id\n  region            = var.region\n}\n```\n\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.3 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 5.70.0, \u003c 6.0.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e= 5.70.0, \u003c 6.0.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_s3_bucket.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |\n| [aws_s3_bucket_acl.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl) | resource |\n| [aws_s3_bucket_lifecycle_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |\n| [aws_s3_bucket_ownership_controls.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_ownership_controls) | resource |\n| [aws_s3_bucket_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |\n| [aws_s3_bucket_public_access_block.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |\n| [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 |\n| [aws_s3_bucket_versioning.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_versioning) | resource |\n| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |\n| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_bucket_name\"\u003e\u003c/a\u003e [bucket\\_name](#input\\_bucket\\_name) | Name to apply to bucket (use `bucket_name` or `bucket_suffix`) | `string` | `null` | no |\n| \u003ca name=\"input_bucket_suffix\"\u003e\u003c/a\u003e [bucket\\_suffix](#input\\_bucket\\_suffix) | Suffix to apply to the bucket (use `bucket_name` or `bucket_suffix`). When using `bucket_suffix`, the bucket name will be `[account_id]-[region]-s3logging-[bucket_suffix].` | `string` | `\"default\"` | no |\n| \u003ca name=\"input_kms_key_id\"\u003e\u003c/a\u003e [kms\\_key\\_id](#input\\_kms\\_key\\_id) | KMS key to encrypt bucket with. | `string` | `null` | no |\n| \u003ca name=\"input_lifecycle_rules\"\u003e\u003c/a\u003e [lifecycle\\_rules](#input\\_lifecycle\\_rules) | lifecycle rules to apply to the bucket | \u003cpre\u003elist(object(\u003cbr\u003e    {\u003cbr\u003e      id                            = string\u003cbr\u003e      enabled                       = optional(bool, true)\u003cbr\u003e      expiration                    = optional(number)\u003cbr\u003e      prefix                        = optional(string)\u003cbr\u003e      noncurrent_version_expiration = optional(number)\u003cbr\u003e      transition = optional(list(object({\u003cbr\u003e        days          = number\u003cbr\u003e        storage_class = string\u003cbr\u003e      })))\u003cbr\u003e  }))\u003c/pre\u003e | \u003cpre\u003e[\u003cbr\u003e  {\u003cbr\u003e    \"id\": \"expire-noncurrent-objects-after-ninety-days\",\u003cbr\u003e    \"noncurrent_version_expiration\": 90\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"id\": \"transition-to-IA-after-30-days\",\u003cbr\u003e    \"transition\": [\u003cbr\u003e      {\u003cbr\u003e        \"days\": 30,\u003cbr\u003e        \"storage_class\": \"STANDARD_IA\"\u003cbr\u003e      }\u003cbr\u003e    ]\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"expiration\": 2557,\u003cbr\u003e    \"id\": \"delete-after-seven-years\"\u003cbr\u003e  }\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_lifecycle_transition_default_minimum_object_size\"\u003e\u003c/a\u003e [lifecycle\\_transition\\_default\\_minimum\\_object\\_size](#input\\_lifecycle\\_transition\\_default\\_minimum\\_object\\_size) | The default minimum object size behavior applied to the lifecycle configuration | `string` | `\"varies_by_storage_class\"` | no |\n| \u003ca name=\"input_object_ownership\"\u003e\u003c/a\u003e [object\\_ownership](#input\\_object\\_ownership) | Specifies S3 object ownership control. Defaults to BucketOwnerPreferred for backwards-compatibility. Recommended value is BucketOwnerEnforced. | `string` | `\"BucketOwnerEnforced\"` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Tags to add to supported resources | `map(string)` | `{}` | no |\n| \u003ca name=\"input_versioning_enabled\"\u003e\u003c/a\u003e [versioning\\_enabled](#input\\_versioning\\_enabled) | Whether or not to use versioning on the bucket. This can be useful for audit purposes since objects in a logging bucket should not be updated. | `bool` | `true` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_s3_bucket_arn\"\u003e\u003c/a\u003e [s3\\_bucket\\_arn](#output\\_s3\\_bucket\\_arn) | The ARN of the bucket |\n| \u003ca name=\"output_s3_bucket_domain_name\"\u003e\u003c/a\u003e [s3\\_bucket\\_domain\\_name](#output\\_s3\\_bucket\\_domain\\_name) | The domain name of the bucket |\n| \u003ca name=\"output_s3_bucket_name\"\u003e\u003c/a\u003e [s3\\_bucket\\_name](#output\\_s3\\_bucket\\_name) | The name of the bucket |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## History\nBetween versions 1.x and 2.x, there were breaking changes. In particular, resource names were changed to follow a `this` convention. The following commands (with some customization for naming) will automatically migrate existing states:\n\n```\nterraform state mv module.s3logging-bucket.aws_s3_bucket.s3logging_bucket module.s3logging-bucket.aws_s3_bucket.this\nterraform state mv module.s3logging-bucket.aws_s3_bucket_public_access_block.block_public_access module.s3logging-bucket.aws_s3_bucket_public_access_block.this\n```\n\nThe `region` var was also been removed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-s3logging-bucket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhythmictech%2Fterraform-aws-s3logging-bucket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-s3logging-bucket/lists"}