Dallas Despain
10/14/2024, 10:56 PMmodule "build_teams_notify" {
source = "terraform-aws-modules/lambda/aws"
build_teams_notify. aws_lambda_function.arn
is not working.Troy Knapp
10/14/2024, 11:11 PMoutput "aws_lambda_function_arn" {
value = aws_lambda_function.arn
}
in the parent:
locals {
my_important_arn = module.build_teams_notify.aws_lambda_function_arn
# my_important_arn = module.build_teams_notify.<name of the output you created in the module>
}
Dallas Despain
10/15/2024, 2:50 PMDallas Despain
10/15/2024, 6:36 PMoutput "aws_lambda_function_arn" {
value = aws_lambda_function.arn
}
Terraform says this:
│ Error: Unsupported block type
│
│ on <http://notify.tf|notify.tf> line 3, in module "build_teams_notify":
│ 3: output "teams_notify_aws_lambda_function_arn" {
│
│ Blocks of type "output" are not expected here.
╵
Dallas Despain
10/15/2024, 6:37 PM╷
│ Error: Reference to undeclared resource
│
│ on <http://notify.tf|notify.tf> line 85, in output "teams_notify_aws_lambda_function_arn":
│ 85: value = aws_lambda_function.arn
│
│ A managed resource "aws_lambda_function" "arn" has not been declared in the root module.
╵
Troy Knapp
10/15/2024, 6:39 PMTroy Knapp
10/15/2024, 6:40 PMDallas Despain
10/15/2024, 6:49 PMDallas Despain
10/15/2024, 6:50 PMTroy Knapp
10/15/2024, 6:51 PMTroy Knapp
10/15/2024, 6:52 PMDallas Despain
10/15/2024, 7:37 PMlocals {
my_important_arn = terraform-aws-modules.lambda_function_arn
}
Troy Knapp
10/15/2024, 7:41 PMDallas Despain
10/15/2024, 7:46 PM