Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikaeelkhalid/aws-codepipeline-discord-notifier-terraform
This Terraform module sets up an AWS Lambda function that sends notifications to a Discord channel via a webhook whenever there's an update in the AWS CodePipeline executions. It is designed to help teams stay informed about their continuous integration and continuous deployment (CI/CD) pipeline status.
https://github.com/mikaeelkhalid/aws-codepipeline-discord-notifier-terraform
aws aws-codepipeline aws-lambda cicd codepipeline discord iac javascript lambda terraform
Last synced: about 1 month ago
JSON representation
This Terraform module sets up an AWS Lambda function that sends notifications to a Discord channel via a webhook whenever there's an update in the AWS CodePipeline executions. It is designed to help teams stay informed about their continuous integration and continuous deployment (CI/CD) pipeline status.
- Host: GitHub
- URL: https://github.com/mikaeelkhalid/aws-codepipeline-discord-notifier-terraform
- Owner: mikaeelkhalid
- Created: 2023-12-08T20:17:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-11T07:24:59.000Z (about 1 year ago)
- Last Synced: 2023-12-11T08:30:49.938Z (about 1 year ago)
- Topics: aws, aws-codepipeline, aws-lambda, cicd, codepipeline, discord, iac, javascript, lambda, terraform
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚀 AWS CodePipeline Discord Notifier using Terraform
[![Mikaeel Khalid](https://badgen.now.sh/badge/by/mikaeelkhalid/purple)](https://github.com/mikaeelkhalid)
## 📜 Overview
This Terraform module sets up an AWS Lambda function that sends notifications to a Discord channel via a webhook whenever there's
an update in the AWS CodePipeline executions. It is designed to help teams stay informed about their continuous integration and
continuous deployment (CI/CD) pipeline status.![AWS CodePipeline Discord Notifier](architecture-diagram/AWS%20CodePipeline%20Discord%20Notifier.jpg)
## 📋 Prerequisites
Before you can use this module, you need the following:
- AWS Account with the necessary permissions to create the resources.
- Terraform installed and configured.
- A Discord channel and a corresponding webhook URL.## 💽 Installation
1. Clone the repository to your local machine.
2. Navigate to the cloned directory.
3. Initialize the Terraform environment with `terraform init`.
4. Plan the deployment with `terraform plan`.
5. Apply the configuration with `terraform apply`.## ⚙️ Configuration
Update the `variables.tf` file with your specific settings:
- `LAMBDA_APP_NAME`: Unique name for the Lambda function.
- `DISCORD_WEBHOOK_URL`: The Discord webhook URL to which the notifications will be sent.
- `DISCORD_CHANNEL`: The target Discord channel for notifications.
- `REGION`: AWS region where the resources will be deployed.
- `RELEVANT_STAGES`: The CodePipeline stages you want to receive notifications for.
- `LAMBDA_MEMORY_SIZE`: The amount of memory allocated to the Lambda function.
- `LAMBDA_TIMEOUT`: The maximum execution time for the Lambda function.## 🛠 Usage
Once configured and applied, the Terraform module will create the following resources:
- AWS Lambda function: Listens for CodePipeline state changes and sends notifications.
- IAM Role and Policy: Grants the necessary permissions for the Lambda function.
- CloudWatch Event Rule: Triggers the Lambda function based on CodePipeline events.
- Lambda Alias: Points to the latest version of the Lambda function.## 🔧 Maintenance
Check for updates to the Terraform AWS provider and update the `required_providers` block in `provider.tf` as necessary. Keep your
Discord webhook URL secret and rotate it periodically for security.## 🆘 Support
For issues and feature requests, open an issue in the GitHub repository.
## 👥 Contributing
Contributions to this project are welcome. Please fork the repository, make your changes, and submit a pull request.