Skip to content

Return latest version number of aws_lambda_function #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ Available targets:
| <a name="output_qualified_arn"></a> [qualified\_arn](#output\_qualified\_arn) | ARN identifying your Lambda Function Version (if versioning is enabled via publish = true) |
| <a name="output_role_arn"></a> [role\_arn](#output\_role\_arn) | Lambda IAM role ARN |
| <a name="output_role_name"></a> [role\_name](#output\_role\_name) | Lambda IAM role name |
| <a name="output_version"></a> [version](#output\_version) | Latest published version of your Lambda Function (if versioning is enabled via publish = true) |
<!-- markdownlint-restore -->


Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,5 @@
| <a name="output_qualified_arn"></a> [qualified\_arn](#output\_qualified\_arn) | ARN identifying your Lambda Function Version (if versioning is enabled via publish = true) |
| <a name="output_role_arn"></a> [role\_arn](#output\_role\_arn) | Lambda IAM role ARN |
| <a name="output_role_name"></a> [role\_name](#output\_role\_name) | Lambda IAM role name |
| <a name="output_version"></a> [version](#output\_version) | Latest published version of your Lambda Function (if versioning is enabled via publish = true) |
<!-- markdownlint-restore -->
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ output "qualified_arn" {
value = local.enabled ? aws_lambda_function.this[0].qualified_arn : null
}

output "version" {
description = "Latest published version of your Lambda Function (if versioning is enabled via publish = true)"
value = local.enabled ? aws_lambda_function.this[0].version : null
}

output "function_name" {
description = "Lambda function name"
value = local.enabled ? aws_lambda_function.this[0].function_name : null
Expand Down