Skip to content

Terraform module: Create bucket for dumping logs

License

Notifications You must be signed in to change notification settings

SensorUp/terraform-logs-module

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Logs

Bucket for logs with lifecycle archiving

Use

module "logs" {
  source   = "[email protected]:willfarrell/terraform-logs-module?ref=v0.5.2"
  name     = "${local.workspace["name"]}-${terraform.workspace}-edge"
  providers = {
    aws = aws.edge
  }
  #kms_key_id = "${}" # Not possible as of 2018-07-15
  tags     = "merge(local.tags, map(
    "Name", "Edge Logs",
    "CostCenter", "Operations"
  ))
}
module "logs" {
  source   = "[email protected]:willfarrell/terraform-s3-logs-module?ref=v0.3.0"
  name     = "${local.workspace["name"]}-${terraform.workspace}-${local.workspace["region"]}"
  #kms_key_id = "${}" # Not possible as of 2018-07-15
  tags     = "merge(local.tags, map(
    "Name", "${local.workspace["region"]} Logs",
    "CostCenter", "Operations"
  ))
}
resource "aws_s3_bucket" "bucket_name" {
  ...
  logging {
    target_bucket = modules.logs.id
    target_prefix = "S3/bucket_name/"
  }
  ...
}

About

Terraform module: Create bucket for dumping logs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%