From 5ab3c1e2e3ea531c482a1ec1cf1cd2b85bf2f112 Mon Sep 17 00:00:00 2001 From: xpk Date: Mon, 4 Mar 2024 11:16:12 +0800 Subject: [PATCH] UPD: added example --- .../apigw-lambda/examples/main.tf | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/ApplicationIntegration/apigw-lambda/examples/main.tf diff --git a/modules/ApplicationIntegration/apigw-lambda/examples/main.tf b/modules/ApplicationIntegration/apigw-lambda/examples/main.tf new file mode 100644 index 0000000..e17ca42 --- /dev/null +++ b/modules/ApplicationIntegration/apigw-lambda/examples/main.tf @@ -0,0 +1,28 @@ +module "apigw" { + source = "../../modules/ApplicationIntegration/apigw-lambda" + + apigw-security-group-id = "sg-04ec154cb0f516e76" + apigw-subnet-ids = ["subnet-0d1e0e378cbcd7295", "subnet-0d86aa4c05033dea8"] + apigw-vpc-id = "vpc-01a10b033169f89a8" + create-vpc-link = false + description = "test apigw-lambda module" + lambda-archive-file = "${path.module}/lambda_function.zip" + name = "ken2026-test" + path_part = "hello" + stage-name = "dev" + lambda-main-function-name = "main" +} + +/* +Directory structure of function directory +❯ tree function/ +function/ +└── main.py +*/ + +data "archive_file" "lambda" { + source_dir = "function" + output_path = "lambda_function.zip" + type = "zip" +} +