This Terraform provider allows you to manage Nango integrations as infrastructure as code.
- Integration Management: Create, read, update, and delete Nango integrations
- OAuth Configuration: Configure OAuth2 credentials and scopes for various providers
- Data Sources: Query existing integrations in your Nango environment
terraform {
required_providers {
nango = {
source = "registry.terraform.io/contio/nango"
version = "~> 1.0"
}
}
}- Clone this repository
- Build the provider:
make build - Install locally:
make install
provider "nango" {
environment_key = "your-nango-environment-key"
}resource "nango_integration" "google" {
unique_key = "platform-google"
display_name = "Google"
nango_provider = "google"
credentials = {
client_id = var.google_client_id
client_secret = var.google_client_secret
type = "OAUTH2"
scopes = [
"https://www.googleapis.com/auth/userinfo.profile",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/calendar.readonly"
]
}
}data "nango_integrations" "all" {}
output "integrations" {
value = data.nango_integrations.all.integrations
}Manages a Nango integration configuration.
unique_key(Required) - Unique identifier for the integrationdisplay_name(Required) - Human-readable name for the integrationnango_provider(Required) - The Nango provider type (e.g., "google", "microsoft")credentials(Required) - OAuth credentials configurationclient_id(Required) - OAuth client IDclient_secret(Required) - OAuth client secrettype(Required) - Credential type (typically "OAUTH2")scopes(Required) - List of OAuth scopes
updated_at- Timestamp of last update
Retrieves all integrations in your Nango environment.
integrations- List of integration objects with the same structure as the resource
See the examples directory for complete configuration examples including:
- Google OAuth integration
- Microsoft OAuth integration
- Multiple service-specific integrations
make buildmake test
make testaccmake generate- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run
make testandmake testacc - Submit a pull request
This project is licensed under the MPL-2.0 License - see the LICENSE file for details.
For issues related to this Terraform provider, please open an issue on GitHub.
For Nango-specific questions, refer to the Nango documentation.