Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.81 KB

README.md

File metadata and controls

48 lines (33 loc) · 1.81 KB

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.