Skip to content

adaptive-scale/terraform-provider-adaptive

Repository files navigation

Terraform Provider for Adaptive

Terraform Registry License

The Adaptive Terraform Provider enables you to manage your Adaptive infrastructure using Infrastructure as Code (IaC).

Features

  • 50+ Integrations - Connect to databases, cloud platforms, Kubernetes, identity providers, and more
  • Fine-grained Access Control - Define authorizations with specific permissions per resource type
  • Just-In-Time Access - Configure JIT access with approval workflows
  • Group Management - Organize users and endpoints for simplified access management

Quick Start

1. Install Prerequisites

2. Authenticate

# Login to Adaptive
adaptive login

# Generate a service token
adaptive service-token create --name terraform-provider

# Set the token as an environment variable
export ADAPTIVE_SVC_TOKEN="your-service-token"

3. Configure the Provider

terraform {
  required_providers {
    adaptive = {
      source  = "adaptive-scale/adaptive"
      version = "~> 1.0"
    }
  }
}

provider "adaptive" {}

4. Create Resources

# Create a PostgreSQL resource
resource "adaptive_resource" "postgres" {
  name          = "my-database"
  type          = "postgres"
  host          = "postgres.example.com"
  port          = "5432"
  username      = "admin"
  password      = var.db_password
  database_name = "myapp"
}

# Create an endpoint for access
resource "adaptive_endpoint" "postgres_access" {
  name     = "postgres-access"
  resource = adaptive_resource.postgres.name
  ttl      = "8h"
  users    = ["developer@example.com"]
}

5. Apply Configuration

terraform init
terraform plan
terraform apply

Supported Integrations

Category Integrations
Databases PostgreSQL, MySQL, MongoDB, CockroachDB, ClickHouse, Snowflake, SQL Server, YugabyteDB, Elasticsearch
Cloud AWS, Azure, GCP
Container Kubernetes
Identity Okta, OneLogin, JumpCloud, Google
Monitoring Datadog, Splunk, Coralogix
Network SSH, ZeroTier, Cisco/Fortinet/Palo Alto NGFW
Messaging RabbitMQ, Microsoft Teams

See the examples directory for configuration examples of each integration.

Resources

The provider includes 5 resource types:

Resource Description
adaptive_resource Connection to external services (databases, cloud platforms, etc.)
adaptive_endpoint Secure access point with TTL, JIT, and user assignments
adaptive_authorization Permission policy for fine-grained access control
adaptive_group User and endpoint organization for access management
adaptive_script Command execution on endpoints

Documentation

Examples

The examples directory contains working configurations for all supported integrations:

# Navigate to an example
cd examples/postgres

# Initialize and apply
terraform init
terraform plan

Development

For contributors and local development:

# Build and install locally
./scripts/build-install.sh

# Test examples
./scripts/test-all-examples.sh
./scripts/test-example.sh kubernetes

# Generate documentation
./scripts/generate-docs.sh

# Full development workflow
./scripts/dev-workflow.sh

See scripts/README.md for detailed development documentation.

Support

License

This provider is distributed under the Mozilla Public License 2.0.

About

Terraform Provider for Adaptive

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors