Terraform Provider - FluxGate

Open-source API gateway for microservices

terraform init
terraform apply -auto-approve
Begin Configuration Registry Docs

Installation & Configuration

Provider Setup

Integrate FluxGate into your Terraform workflows to declaratively manage routes, auth policies, and rate limits alongside your cloud infrastructure.

Add the FluxGate provider to your `versions.tf` file. The provider authenticates using the `FLUXGATE_API_TOKEN` environment variable, which you can generate from your dashboard under Settings > API Keys. Supported Terraform versions: 1.3.0 and above.

provider "fluxgate" {
  api_endpoint = "https://api.fluxgate.io/v1"
  workspace = "production-us-east"
}

Core Objects

Available Resources

Manage the full lifecycle of your gateway configuration with first-class Terraform resources.

fluxgate_route

Define ingress paths, rewrite rules, and upstream service bindings. Supports path, prefix, and header matching with weighted load balancing across up to 64 backend pods.

fluxgate_policy

Attach JWT validation, OAuth2 introspection, or API key verification to specific routes or service groups. Configurable TTLs and audience claims.

fluxgate_rate_limit

Enforce per-client or per-endpoint request throttling. Supports sliding window and token bucket algorithms with Redis-backed state synchronization.

fluxgate_tls_cert

Automate certificate provisioning and rotation via Let's Encrypt or ACME v2. Integrates directly with your DNS provider for DNS-01 challenge validation.

Reference Architectures

Implementation Examples

Production-ready HCL snippets to accelerate your gateway deployments.

Service Mesh Ingress

Route external traffic to internal Kubernetes services with mTLS termination and automatic header injection.

resource "fluxgate_route" "payments" {
  name = "payments-ingress"
  match = "/api/v1/payments"
  upstream = "payments-svc.mesh.local"
  timeout = "5s"
}

Multi-Tenant Auth

Apply strict JWT validation and tenant isolation headers across a shared gateway cluster.

resource "fluxgate_policy" "tenant_auth" {
  name = "strict-jwt"
  type = "jwt"
  jwk_uri = "https://auth.example.com/.well-known/jwks.json"
  audience = ["tenant-a", "tenant-b"]
}