-
-
Save KyMidd/cfe71f854f40e54d440d31ac8e5372b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Publish alias of new version | |
| resource "aws_lambda_alias" "devopsbot_alias" { | |
| name = "Latest" | |
| function_name = aws_lambda_function.devopsbot_slack.arn | |
| function_version = aws_lambda_function.devopsbot_slack.version | |
| } | |
| # Point lambda function url at new version | |
| resource "aws_lambda_function_url" "DevOpsBot_Slack_Trigger_FunctionUrl" { | |
| function_name = aws_lambda_function.devopsbot_slack.function_name | |
| authorization_type = "NONE" | |
| qualifier = aws_lambda_alias.devopsbot_alias.name | |
| } | |
| # Print the URL we can use to trigger the bot | |
| output "DevOpsBot_Slack_Trigger_FunctionUrl" { | |
| value = aws_lambda_function_url.DevOpsBot_Slack_Trigger_FunctionUrl.function_url | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment