Skip to content

A helper terraform module to perform builds using local shell and docker.

Notifications You must be signed in to change notification settings

opendevsecops/terraform-local-archive-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Follow on Twitter Codacy Badge

Local Archive Builder Terraform Module

A helper module to perform builds using local shell and docker.

This module is used extensively throughout other OpenDevSecOps projects as well as secapps.com.

Getting Started

The module is automatically published to the Terraform Module Registry. More information about the available inputs, outputs, dependencies, and instructions on how to use the module can be found at the official page here.

The following example can be used as starting point:

module "acme_archive_builder" {
  source  = "opendevsecops/archive-builder/null"
  version = "1.0.0"

  source_dir = "../src/"
  output_dir = "../build/"

  name   = "acme"
  prefix = "emca"

  command   = "pip -r requirements.txt"
  container = "python"
}

Later you can use the output to deploy a lambda layer for example:

resource "aws_lambda_layer_version" "main" {
  filename         = module.acme_archive_builder.output_file
  source_code_hash = module.acme_archive_builder.output_file_hash

  layer_name          = local.name
  compatible_runtimes = local.runtimes

  depends_on = [
    module.archive-builder
  ]
}

Refer to the module registry page for additional information on optional inputs and configuration.

About

A helper terraform module to perform builds using local shell and docker.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages