The most comprehensive Terraform provider for Peekaping monitoring infrastructure
- 🎯 Complete Infrastructure as Code - Full CRUD operations, state management, and import support
- 🔐 Enterprise Security - 2FA support, secure credentials, and environment variable management
- 📊 Rich Monitoring - 18 monitor types with JSON configuration and advanced scheduling
- 🎨 Status Pages - Public status pages with custom themes and real-time updates
- 🔔 Smart Notifications - Multiple channels with flexible routing and default settings
- 🏷️ Organization - Tag-based organization, maintenance windows, and proxy support
- peekaping_monitor - Create and manage monitoring checks (HTTP, HTTP-keyword, HTTP-JSON-query, TCP, Ping, DNS, Push, Docker, gRPC-keyword, SNMP, MongoDB, MySQL, PostgreSQL, SQL Server, Redis, MQTT, RabbitMQ, Kafka Producer)
- peekaping_notification - Configure notification channels (Email, webhook, custom channels)
- peekaping_tag - Organize monitors with tags (All monitor types)
- peekaping_maintenance - Schedule maintenance windows (All monitor types)
- peekaping_status_page - Create public status pages (All monitor types)
- peekaping_proxy - Configure proxy settings (All monitor types)
- peekaping_monitor - Query existing monitors (Find monitors by name, type, or tags)
- peekaping_notification - Query notification channels (Discover available notification channels)
- peekaping_tag - Query tags (Lookup tags and their configurations)
- peekaping_maintenance - Query maintenance windows (Find scheduled maintenance periods)
- peekaping_status_page - Query status pages (Discover existing status pages)
- peekaping_proxy - Query proxy configurations (Find available proxy settings)
Add the provider to your Terraform configuration:
terraform {
required_providers {
peekaping = {
source = "tafaust/peekaping"
version = "~> 0.1.1"
}
}
}Then run:
terraform initFor development or testing with the latest changes:
-
Clone and build:
git clone https://github.com/tafaust/terraform-provider-peekaping cd terraform-provider-peekaping go build -o terraform-provider-peekaping -
Configure Terraform (
~/.terraformrc):provider_installation { dev_overrides { "tafaust/peekaping" = "/path/to/terraform-provider-peekaping" } direct {} }
-
Initialize:
terraform init
Configure the provider in your Terraform files:
provider "peekaping" {
endpoint = "https://api.peekaping.com" # Your Peekaping instance URL
email = "your-email@example.com" # Your Peekaping email
password = "your-password" # Your Peekaping password
token = "123456" # 2FA token (if 2FA is enabled)
}Environment Variables (Alternative to provider config):
export PEEKAPING_ENDPOINT="https://api.peekaping.com"
export PEEKAPING_EMAIL="your-email@example.com"
export PEEKAPING_PASSWORD="your-password"
export PEEKAPING_TOKEN="123456" # 2FA token| Example | Description | Complexity |
|---|---|---|
| Simple | Basic HTTP monitor setup | ⭐ Beginner |
| Comprehensive | Full monitoring stack | ⭐⭐⭐ Advanced |
| Full Lifecycle | Complete workflow demo | ⭐⭐ Intermediate |
HTTP Monitor with Notifications:
resource "peekaping_monitor" "api" {
name = "API Health Check"
type = "http"
config = jsonencode({
url = "https://api.example.com/health"
method = "GET"
headers = {
"Authorization" = "Bearer ${var.api_token}"
}
})
interval = 30
timeout = 10
}
resource "peekaping_notification" "email" {
name = "Team Alerts"
type = "email"
config = jsonencode({
emails = ["team@example.com"]
})
}Database Monitoring:
resource "peekaping_monitor" "postgres" {
name = "PostgreSQL Database"
type = "postgresql"
config = jsonencode({
hostname = "db.example.com"
port = 5432
username = "monitor"
password = var.db_password
database = "app_db"
})
}# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific test
go test ./internal/provider -run TestResourceMonitor# Validate examples
cd examples/simple
terraform init
terraform plan
terraform apply
# Test comprehensive setup
cd examples/comprehensive
terraform init
terraform plan
terraform apply├── internal/
│ ├── peekaping/ # API client implementation
│ └── provider/ # Terraform provider resources
├── examples/ # Real-world usage examples
├── docs/ # Comprehensive documentation
├── tools/ # Development tools
└── main.go # Provider entry point
# Build the provider
go build -o terraform-provider-peekaping
# Build for multiple platforms
GOOS=linux GOARCH=amd64 go build -o terraform-provider-peekaping-linux
GOOS=windows GOARCH=amd64 go build -o terraform-provider-peekaping-windows.exe# 1. Make changes to the code
# 2. Run tests
go test ./...
# 3. Build the provider
go build -o terraform-provider-peekaping
# 4. Test with examples
cd examples/simple
terraform init
terraform plan
terraform apply- 2FA Token Expiration: 2FA tokens expire quickly and need frequent updates during development
- JSON Formatting: Monitor config JSON is normalized for consistency across different monitor types
We love contributions! This project thrives on community input and collaboration.
| Contribution Type | Description | Impact |
|---|---|---|
| 🐛 Bug Reports | Found an issue? Let us know! | High |
| 💡 Feature Requests | Have an idea? We'd love to hear it! | High |
| 📝 Documentation | Improve examples, docs, or README | Medium |
| 🔧 Code Contributions | Fix bugs or add features | High |
| 🧪 Testing | Add tests or improve coverage | Medium |
| 📢 Community | Help others, answer questions | High |
- ⭐ Star this repository - It helps others discover the project!
- 🍴 Fork the repository
- 🌿 Create a feature branch:
git checkout -b feature/amazing-feature - 💻 Make your changes
- ✅ Add tests for new functionality
- 📝 Update documentation if needed
- 🔄 Submit a pull request
- Code Style: Follow Go conventions and run
gofmt - Testing: Add tests for new features and bug fixes
- Documentation: Update README and examples as needed
- Commit Messages: Use clear, descriptive commit messages
- Pull Requests: Provide a clear description of changes
- Discussions: Use GitHub Discussions for questions and ideas
- Issues: Report bugs and request features
- Pull Requests: Submit code improvements
Every contribution matters! Whether you're fixing a typo or adding a new monitor type, your help makes this project better for everyone.
| Resource | Description | Link |
|---|---|---|
| 📚 Documentation | Complete API reference and guides | docs/ |
| 💡 Examples | Real-world usage examples | examples/ |
| 🐛 Bug Reports | Found an issue? Let us know! | GitHub Issues |
| 💬 Discussions | Questions and community chat | GitHub Discussions |
| 📖 Terraform Registry | Official provider documentation | Registry |
- All Core Resources - Monitors, notifications, tags, maintenance, status pages, proxies
- Data Sources - Query existing resources
- 18 Monitor Types - Comprehensive monitoring coverage
- 2FA Support - Enhanced security
- Terraform Registry - Official provider distribution
- Comprehensive Examples - Real-world usage patterns
- Production Testing - Battle-tested reliability
- API Key Authentication - Alternative auth method (PR merged)
- Enhanced Error Handling - Better user experience
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the community, for the community