Created
August 14, 2020 22:01
-
-
Save alfredlucero/22a6e2e694a4b62df2368f2bc53c9ff7 to your computer and use it in GitHub Desktop.
Security Headers Terraform - Lambda Zip Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In each of our development and production folders we have a main.tf, backend.tf, | |
# and lambas folder holding the environment's lambdas | |
# We intend on zipping up the files within the lambdas folder for us to eventually upload for our lambda function resource | |
# We pass in variables such as source_dir_path and zip_filename for flexibility when instantiating this module for different environments | |
data "archive_file" "lambda_zip" { | |
type = "zip" | |
source_dir = "./lambdas/${var.source_dir_path}" | |
output_path = "./lambdas/${var.zip_filename}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment