-
-
Save KyMidd/45c7af8b7f25fbe98e2b1a718a573e50 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_receiver_alias" { | |
| name = "Newest" | |
| function_name = aws_lambda_function.devopsbot_receiver.arn | |
| function_version = aws_lambda_function.devopsbot_receiver.version | |
| # Add ignore for routing_configuration | |
| lifecycle { | |
| ignore_changes = [ | |
| routing_config, # This sometimes has a race condition, so ignore changes to it | |
| ] | |
| } | |
| } | |
| # Point lambda function url at new version | |
| resource "aws_lambda_function_url" "DevOpsBotReceiver_Slack_Trigger_FunctionUrl" { | |
| function_name = aws_lambda_function.devopsbot_receiver.function_name | |
| qualifier = aws_lambda_alias.devopsbot_receiver_alias.name | |
| authorization_type = "NONE" | |
| } | |
| # Print the URL we can use to trigger the bot | |
| output "DevOpsBot_Slack_Trigger_FunctionUrl" { | |
| value = aws_lambda_function_url.DevOpsBotReceiver_Slack_Trigger_FunctionUrl.function_url | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment