Skip to content

Commit ac21d5e

Browse files
committed
Update output so the ARN can't be accessed until the function creation is complete (all permissions applied)
1 parent 8156bf9 commit ac21d5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

outputs.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
output "invicton_labs_lambda_shell_arn" {
22
description = "The ARN of the Lambda function. The output is oddly named because it's used to ensure that the correct module is passed into the lambda-shell-resource and lambda-shell-data modules."
3-
value = module.shell_lambda.lambda.arn
3+
// Use the "complete" output of the inner Lambda module so that the function ARN can't be used until everything has been completed (permissions have been applied)
4+
value = module.shell_lambda.complete ? module.shell_lambda.lambda.arn : module.shell_lambda.lambda.arn
45
}

0 commit comments

Comments
 (0)