Slack webhooks not working
Community Note
- Please vote on this issue by adding a reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
Regarding the official documentation here and passing webhooks configuration with server configuration using terraform module, we should get Slack notifications as expected The Slack token is tested with curl, and notifications are delivered
Reproduction Steps
Terraform module https://github.com/terraform-aws-modules/terraform-aws-atlantis ECS Fargate task from the official Docker image https://github.com/runatlantis/atlantis/pkgs/container/atlantis/448754282?tag=latest Vars:
atlantis = {
environment = [
{
name : "ATLANTIS_REPO_CONFIG_JSON",
value : jsonencode(yamldecode(file("${path.module}/server-atlantis.yaml"))),
}
]
secrets = [
{
name = "ATLANTIS_SLACK_TOKEN"
valueFrom = data.aws_secretsmanager_secret.atlantis_slack_token.arn
}
]
}server-atlantis.yaml:
repos:
- id: /.*/
allow_custom_workflows: true
allowed_overrides:
- apply_requirements
- workflow
apply_requirements:
- approved
workflow: default
webhooks:
- event: apply
kind: slack
channel: XXXXXXXXXXX
- event: plan
kind: slack
channel: XXXXXXXXXXXLogs
Nothing related to webhooks or Slack in the logs
Environment details
ATLANTIS_SLACK_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ATLANTIS_REPO_CONFIG_JSON={"repos":[{"allow_custom_workflows":true,"allowed_overrides":["apply_requirements","workflow"],"apply_requirements":["approved"],"id":"/.*/","workflow":"default"}],"webhooks":[{"channel":"XXXXXXXXXXX","event":"apply","kind":"slack"},{"channel":"XXXXXXXXXXX","event":"plan","kind":"slack"}]}
Additional Context
Source: runatlantis/atlantis