A comprehensive Terraform provider for managing SendGrid resources with enhanced features and reliability.
- Advanced Rate Limiting - Built-in exponential backoff and retry logic for reliable operations
- Teammate Management - Complete lifecycle management, including pending invitations and SSO support
- Template Management - Full template and version control with dynamic content
- Webhook Security - OAuth and signature verification for parse webhooks
- Event Webhooks - Real-time email event notifications with friendly names
- Multiple Auth Methods - Environment variables, Terraform variables, and CI/CD integration
- Rich Documentation - Extensive examples, troubleshooting guides, and API references
# Set your API key
export SENDGRID_API_KEY="SG.your-api-key-here"terraform {
required_providers {
sendgrid = {
source = "arslanbekov/sendgrid"
version = "~> 2.0"
}
}
}
provider "sendgrid" {}
resource "sendgrid_teammate" "example" {
email = "teammate@example.com"
is_admin = false
is_sso = false
scopes = ["mail.send"]
}terraform init && terraform apply| Topic | Description |
|---|---|
| Installation | Installation methods and requirements |
| Authentication | All authentication methods and security best practices |
| Resources | Complete list of resources and data sources |
| Troubleshooting | Common issues and solutions |
| Rate Limiting | Rate limiting handling and best practices |
| Migration Guide | Guide for migrating between major versions |
| Testing Guide | How to run and write tests |
- Team Management: Invite and manage teammates with specific permissions
- Email Templates: Create and version email templates
- API Key Management: Secure API key creation with minimal scopes
- Domain Setup: Configure domain authentication and link branding
- Webhook Configuration: Set up event and parse webhooks
- Teammate Management:
sendgrid_teammate- Manage team members and permissions - Templates:
sendgrid_template,sendgrid_template_version- Email template management - API Keys:
sendgrid_api_key- Scoped API key management - Domain Configuration:
sendgrid_domain_authentication,sendgrid_link_branding- Domain setup - Webhooks:
sendgrid_event_webhook,sendgrid_parse_webhook,sendgrid_webhook_security_policy- Webhook configuration - SSO:
sendgrid_sso_integration,sendgrid_sso_certificate- Single Sign-On setup - Subusers:
sendgrid_subuser- Subuser account management - Unsubscribe Groups:
sendgrid_unsubscribe_group- Manage unsubscribe groups
See full documentation for details.
- Go 1.24+ (see .github/workflows/test.yml)
- Terraform 1.0+
- SendGrid API key with appropriate permissions
go build -o terraform-provider-sendgridThe provider includes both unit tests and acceptance tests:
# Run unit tests
make test
# Run acceptance tests (requires SENDGRID_API_KEY)
make testaccNote: Test coverage is primarily achieved through acceptance tests against the real SendGrid API. Current coverage: ~44% (standard for Terraform providers with external API dependencies).
See TESTING.md for detailed testing instructions.
Contributions are welcome! We'd love your help improving this provider.
Before contributing:
- Read our Contributing Guide
- Review the Code of Conduct
Quick start:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Add tests for your changes
- Run
make fmtandmake lint - Commit your changes with clear messages (Conventional Commits)
- Push to your branch and create a Pull Request
For significant changes, please open an issue first to discuss the proposed changes.
This project is licensed under the Mozilla Public License 2.0.
For support options, see our Support Guide.
Disclaimer: This is an unofficial provider maintained by the community. While it offers enhanced features and comprehensive testing, evaluate thoroughly for production use.