{"id":13481940,"url":"https://github.com/tmknom/terraform-aws-s3-lb-log","last_synced_at":"2025-04-03T04:37:17.059Z","repository":{"id":33754958,"uuid":"157559441","full_name":"tmknom/terraform-aws-s3-lb-log","owner":"tmknom","description":"Terraform module which creates S3 Bucket resources for Load Balancer Access Logs on AWS.","archived":false,"fork":false,"pushed_at":"2022-04-01T19:01:24.000Z","size":35,"stargazers_count":8,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T12:39:54.677Z","etag":null,"topics":["aws","s3","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmknom.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":null,"security":null,"support":null}},"created_at":"2018-11-14T14:17:57.000Z","updated_at":"2021-11-23T01:09:47.000Z","dependencies_parsed_at":"2022-08-07T23:00:48.423Z","dependency_job_id":null,"html_url":"https://github.com/tmknom/terraform-aws-s3-lb-log","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-s3-lb-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-s3-lb-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-s3-lb-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-s3-lb-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmknom","download_url":"https://codeload.github.com/tmknom/terraform-aws-s3-lb-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246939174,"owners_count":20857916,"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","s3","terraform","terraform-module"],"created_at":"2024-07-31T17:00:57.628Z","updated_at":"2025-04-03T04:37:17.040Z","avatar_url":"https://github.com/tmknom.png","language":"HCL","funding_links":[],"categories":["HCL"],"sub_categories":[],"readme":"# terraform-aws-s3-lb-log\n\n[![Terraform Actions Status](https://github.com/tmknom/terraform-aws-s3-lb-log/workflows/Terraform/badge.svg)](https://github.com/tmknom/terraform-aws-s3-lb-log/actions?query=workflow%3ATerraform)\n[![Markdown Actions Status](https://github.com/tmknom/terraform-aws-s3-lb-log/workflows/Markdown/badge.svg)](https://github.com/tmknom/terraform-aws-s3-lb-log/actions?query=workflow%3AMarkdown)\n[![YAML Actions Status](https://github.com/tmknom/terraform-aws-s3-lb-log/workflows/YAML/badge.svg)](https://github.com/tmknom/terraform-aws-s3-lb-log/actions?query=workflow%3AYAML)\n[![JSON Actions Status](https://github.com/tmknom/terraform-aws-s3-lb-log/workflows/JSON/badge.svg)](https://github.com/tmknom/terraform-aws-s3-lb-log/actions?query=workflow%3AJSON)\n[![GitHub tag](https://img.shields.io/github/tag/tmknom/terraform-aws-s3-lb-log.svg)](https://registry.terraform.io/modules/tmknom/s3-lb-log/aws)\n[![License](https://img.shields.io/github/license/tmknom/terraform-aws-s3-lb-log.svg)](https://opensource.org/licenses/Apache-2.0)\n\nTerraform module which creates S3 Bucket resources for Load Balancer Access Logs on AWS.\n\n## Description\n\nProvision [S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/Welcome.html) bucket\ndesigned for [Load Balancer Access Logs](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html).\nThis module provides recommended settings.\n\n- Enable Access Logging\n- Enable Default Encryption\n- Enable Versioning\n- Enable Lifecycle Configuration\n- Protected from deletion\n\n## Usage\n\n### Minimal\n\n```hcl\nmodule \"s3_lb_log\" {\n  source                = \"git::https://github.com/tmknom/terraform-aws-s3-lb-log.git?ref=tags/2.0.0\"\n  name                  = \"s3-lb-log\"\n  logging_target_bucket = \"s3-access-log\"\n}\n```\n\n### Complete\n\n```hcl\nmodule \"s3_lb_log\" {\n  source                = \"git::https://github.com/tmknom/terraform-aws-s3-lb-log.git?ref=tags/2.0.0\"\n  name                  = \"s3-lb-log\"\n  logging_target_bucket = \"s3-access-log\"\n\n  versioning_enabled = false\n  force_destroy      = true\n\n  region                                     = \"ap-northeast-1\"\n  lifecycle_rule_enabled                     = true\n  lifecycle_rule_prefix                      = \"\"\n  standard_ia_transition_days                = \"60\"\n  glacier_transition_days                    = \"90\"\n  expiration_days                            = \"180\"\n  glacier_noncurrent_version_transition_days = \"60\"\n  noncurrent_version_expiration_days         = \"90\"\n\n  tags = {\n    Environment = \"prod\"\n    Name        = \"s3-lb-log\"\n  }\n}\n```\n\n## Examples\n\n- [Minimal](https://github.com/tmknom/terraform-aws-s3-lb-log/tree/master/examples/minimal)\n- [Complete](https://github.com/tmknom/terraform-aws-s3-lb-log/tree/master/examples/complete)\n\n\u003c!-- BEGINNING OF GENERATED BY TERRAFORM-DOCS --\u003e\n\n## Requirements\n\n| Name      | Version |\n| --------- | ------- |\n| terraform | \u003e= 0.12 |\n\n## Providers\n\n| Name | Version |\n| ---- | ------- |\n| aws  | n/a     |\n\n## Inputs\n\n| Name                                       | Description                                                                                                               | Type          | Default | Required |\n| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | ------------- | ------- | :------: |\n| logging_target_bucket                      | The name of the bucket that will receive the log objects.                                                                 | `string`      | n/a     |   yes    |\n| name                                       | The name of the bucket, which must comply with DNS naming conventions.                                                    | `string`      | n/a     |   yes    |\n| expiration_days                            | Specifies a period in the object's expire.                                                                                | `string`      | `\"90\"`  |    no    |\n| force_destroy                              | A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. | `string`      | `false` |    no    |\n| glacier_noncurrent_version_transition_days | Specifies when noncurrent object versions transitions.                                                                    | `string`      | `\"30\"`  |    no    |\n| glacier_transition_days                    | Specifies a period in the object's Glacier transitions.                                                                   | `string`      | `\"60\"`  |    no    |\n| lifecycle_rule_enabled                     | Specifies lifecycle rule status.                                                                                          | `string`      | `true`  |    no    |\n| lifecycle_rule_prefix                      | Object key prefix identifying one or more objects to which the rule applies.                                              | `string`      | `\"\"`    |    no    |\n| noncurrent_version_expiration_days         | Specifies when noncurrent object versions expire.                                                                         | `string`      | `\"60\"`  |    no    |\n| region                                     | (Optional) If specified, the AWS region this bucket should reside in. Otherwise, the region used by the callee.           | `string`      | `\"\"`    |    no    |\n| standard_ia_transition_days                | Specifies a period in the object's STANDARD_IA transitions.                                                               | `string`      | `\"30\"`  |    no    |\n| tags                                       | A mapping of tags to assign to the bucket.                                                                                | `map(string)` | `{}`    |    no    |\n| versioning_enabled                         | Enable versioning. Versioning is a means of keeping multiple variants of an object in the same bucket.                    | `string`      | `true`  |    no    |\n\n## Outputs\n\n| Name                     | Description                                                            |\n| ------------------------ | ---------------------------------------------------------------------- |\n| s3_bucket_arn            | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname.      |\n| s3_bucket_domain_name    | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. |\n| s3_bucket_hosted_zone_id | The Route 53 Hosted Zone ID for this bucket's region.                  |\n| s3_bucket_id             | The name of the bucket.                                                |\n| s3_bucket_region         | The AWS region this bucket resides in.                                 |\n\n\u003c!-- END OF GENERATED BY TERRAFORM-DOCS --\u003e\n\n## Development\n\n### Development Requirements\n\n- [Docker](https://www.docker.com/)\n\n### Configure environment variables\n\n```shell\nexport AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE\nexport AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nexport AWS_DEFAULT_REGION=ap-northeast-1\n```\n\n### Installation\n\n```shell\ngit clone git@github.com:tmknom/terraform-aws-s3-lb-log.git\ncd terraform-aws-s3-lb-log\nmake install\n```\n\n### Makefile targets\n\n```text\napply-complete                 Run terraform apply examples/complete\napply-minimal                  Run terraform apply examples/minimal\ncheck-format                   Check format code\nclean                          Clean .terraform\ndestroy-complete               Run terraform destroy examples/complete\ndestroy-minimal                Run terraform destroy examples/minimal\ndiff                           Word diff\ndocs                           Generate docs\nformat                         Format code\nhelp                           Show help\ninstall                        Install requirements\nlint                           Lint code\nplan-complete                  Run terraform plan examples/complete\nplan-minimal                   Run terraform plan examples/minimal\nrelease                        Release GitHub and Terraform Module Registry\nupgrade                        Upgrade makefile\n```\n\n### Releasing new versions\n\nBump VERSION file, and run `make release`.\n\n### Terraform Module Registry\n\n- \u003chttps://registry.terraform.io/modules/tmknom/s3-lb-log/aws\u003e\n\n## License\n\nApache 2 Licensed. See LICENSE for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmknom%2Fterraform-aws-s3-lb-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmknom%2Fterraform-aws-s3-lb-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmknom%2Fterraform-aws-s3-lb-log/lists"}