Skip to content

scottwinkler/terraform-s3-unzip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-s3-unzip

This is a terraform module for unzipping a file from put to an s3 bucket. It creates a lambda function, role, policy and s3 bucket notification trigger. When a zip file is uploaded to the src s3 bucket, then it will unzip it, and upload those files to the dst bucket.

Argument Reference

  • src_bucket - (Required) The source bucket to listen for put object events
  • src_bucket_arn - (Required) The arn of the same source bucket
  • project_name - (Optional) Identifier for your project
  • dst_bucket - (Optional) The destination bucket to send the unzipped files, if not the source bucket
  • delete_zip - (Optional) A boolean, set true if you wish to delete the original zip file. Default is false.

Example Usage

module "test" {
    source = "github.com/scottwinkler/terraform-s3-unzip"
    src_bucket = "${aws_s3_bucket.s3_bucket.bucket}"
    src_bucket_arn = "${aws_s3_bucket.s3_bucket.arn}"
    project_name = "test"
    delete_zip = true
}

Credit to https://github.com/toshi0607/s3-unzipper-go for writing the go code for a similar idea.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published