File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 11# Callback Lambda
2+ data "archive_file" "callback_lambda_zip" {
3+ count = local. enabled ? 1 : 0
4+ type = " zip"
5+ source_file = " ${ path . module } /lambda/callback/index.js"
6+ output_path = " ${ path . module } /lambda/callback.zip"
7+ }
8+
29resource "archive_file" "callback_lambda_zip" {
310 count = local. enabled ? 1 : 0
411 type = " zip"
@@ -12,8 +19,8 @@ resource "aws_lambda_function" "oidc_callback" {
1219 role = aws_iam_role. lambda_oidc [0 ]. arn
1320 handler = " index.handler"
1421 runtime = " nodejs22.x"
15- filename = resource . archive_file . callback_lambda_zip [0 ]. output_path
16- source_code_hash = resource . archive_file . callback_lambda_zip [0 ]. output_base64sha256
22+ filename = data . archive_file . callback_lambda_zip [0 ]. output_path
23+ source_code_hash = data . archive_file . callback_lambda_zip [0 ]. output_base64sha256
1724 publish = true
1825
1926 environment {
Original file line number Diff line number Diff line change 11# Edge Lambda
2+ data "archive_file" "edge_lambda_zip" {
3+ count = local. enabled ? 1 : 0
4+ type = " zip"
5+ output_path = " ${ path . module } /lambda/edge_auth.zip"
6+
7+ source {
8+ filename = " index.js"
9+ content = file (" ${ path . module } /lambda/edge_auth/index.js" )
10+ }
11+
12+ source {
13+ filename = " config.json"
14+ content = local. oidc_config_json
15+ }
16+ }
17+
218resource "archive_file" "edge_lambda_zip" {
319 count = local. enabled ? 1 : 0
420 type = " zip"
@@ -22,8 +38,8 @@ resource "aws_lambda_function" "edge_auth" {
2238 role = aws_iam_role. lambda_oidc [0 ]. arn
2339 handler = " index.handler"
2440 runtime = " nodejs22.x"
25- filename = resource . archive_file . edge_lambda_zip [0 ]. output_path
26- source_code_hash = resource . archive_file . edge_lambda_zip [0 ]. output_base64sha256
41+ filename = data . archive_file . edge_lambda_zip [0 ]. output_path
42+ source_code_hash = data . archive_file . edge_lambda_zip [0 ]. output_base64sha256
2743 publish = true
2844
2945 tags = var. tags
You can’t perform that action at this time.
0 commit comments