-
Notifications
You must be signed in to change notification settings - Fork 143
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
Terraform Lambda doesn't include env var for channels (Slack, Teams or Chime) #76
Comments
Found the same problem in mine too. I fixed it on my code only. |
Hi, are you able to share your fix ? |
Hi @totogtr , since we are only using teams channel in our org, i removed all other channels thats defined in the lambda functions. I also removed all other if elif conditions when sending the message. |
Committed a few terraform updates including this one to https://github.com/aws-samples/aws-health-aware/tree/terraform-updates Will plan to include in upcoming release. |
On Lambda handler.py lines 702 to 709 there are calls to get secrets in case environment variables are set for channels to be communicated. (
get_secret(secret_teams_name, client) if "Teams" in os.environ else "None"
)The Terraform code, however, doesn't populate that variable dynamically, therefore there will never be those environment variables and the notifications won't be sent.
I corrected it on my code by making the lambda variables as a local variable and merging them to the notifications channel in case they're populated.
Hope this helps.
The text was updated successfully, but these errors were encountered: