Added layer, fixed add of content
This commit is contained in:
16
master.tf
16
master.tf
@@ -150,6 +150,18 @@ data "archive_file" "lambda_standout_config_code" {
|
||||
output_path = "./lambda_zip/standout_lambda_config.zip"
|
||||
}
|
||||
|
||||
data "archive_file" "lambda_layer_deps" {
|
||||
type = "zip"
|
||||
source_dir = "./lambda_layer"
|
||||
output_path = "./lambda_zip/lambda_layer.zip"
|
||||
}
|
||||
|
||||
resource "aws_lambda_layer_version" "lambda_layer" {
|
||||
filename = "./lambda_zip/lambda_layer.zip"
|
||||
layer_name = "lambda_deps"
|
||||
compatible_runtimes = ["python3.12"]
|
||||
}
|
||||
|
||||
resource "aws_lambda_function" "lambda_standout_redirect" {
|
||||
# If the file is not in the current working directory you will need to include a
|
||||
# path.module in the filename.
|
||||
@@ -162,6 +174,8 @@ resource "aws_lambda_function" "lambda_standout_redirect" {
|
||||
|
||||
runtime = "python3.12"
|
||||
|
||||
layers = [aws_lambda_layer_version.lambda_layer.arn]
|
||||
|
||||
timeout = 10
|
||||
|
||||
environment {
|
||||
@@ -184,6 +198,8 @@ resource "aws_lambda_function" "lambda_standout_config" {
|
||||
|
||||
runtime = "python3.12"
|
||||
|
||||
layers = [aws_lambda_layer_version.lambda_layer.arn]
|
||||
|
||||
timeout = 10
|
||||
|
||||
environment {
|
||||
|
||||
Reference in New Issue
Block a user