-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputs.tf
More file actions
93 lines (78 loc) · 2.64 KB
/
outputs.tf
File metadata and controls
93 lines (78 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Lambda function outputs
output "function_name" {
description = "Lambda function name"
value = aws_lambda_function.this.function_name
}
output "function_arn" {
description = "Lambda function ARN"
value = aws_lambda_function.this.arn
}
output "function_invoke_arn" {
description = "Lambda function invoke ARN"
value = aws_lambda_function.this.invoke_arn
}
output "function_qualified_arn" {
description = "Lambda function qualified ARN"
value = aws_lambda_function.this.qualified_arn
}
output "function_version" {
description = "Lambda function version"
value = aws_lambda_function.this.version
}
output "function_last_modified" {
description = "Lambda function last modified date"
value = aws_lambda_function.this.last_modified
}
output "function_source_code_hash" {
description = "Lambda function source code hash"
value = aws_lambda_function.this.source_code_hash
}
output "function_source_code_size" {
description = "Lambda function source code size"
value = aws_lambda_function.this.source_code_size
}
# IAM role outputs
output "execution_role_arn" {
description = "Lambda execution role ARN"
value = aws_iam_role.lambda_execution.arn
}
output "execution_role_name" {
description = "Lambda execution role name"
value = aws_iam_role.lambda_execution.name
}
# CloudWatch log group outputs
output "log_group_name" {
description = "CloudWatch log group name"
value = aws_cloudwatch_log_group.lambda_logs.name
}
output "log_group_arn" {
description = "CloudWatch log group ARN"
value = aws_cloudwatch_log_group.lambda_logs.arn
}
# Package outputs (Zip only)
output "package_path" {
description = "Path to the Lambda deployment package"
value = var.package_type == "Zip" ? (local.use_prebuilt_zip ? var.filename : data.archive_file.lambda_zip[0].output_path) : null
}
output "package_size" {
description = "Size of the Lambda deployment package"
value = var.package_type == "Zip" ? (local.use_prebuilt_zip ? null : data.archive_file.lambda_zip[0].output_size) : null
}
# Template outputs
output "template_files" {
description = "Paths to created template files"
value = var.create_templates ? {
bootstrap = "${var.template_dir}/bootstrap"
handler = "${var.template_dir}/handler.sh"
makefile = "${var.template_dir}/Makefile"
} : {}
}
# SSM parameter outputs
output "ssm_parameters" {
description = "SSM parameter names for Serverless integration"
value = {
function_name = aws_ssm_parameter.function_name.name
function_arn = aws_ssm_parameter.function_arn.name
invoke_arn = aws_ssm_parameter.invoke_arn.name
}
}