The Hush Terraform Provider allows managing Hush sensor deployments via the Hush Security API.
Features
- Resource Management: Create, read, update, and delete Hush deployments
- Data Sources: Query existing deployments by ID
- Automatic Authentication: OAuth2 client credentials flow with automatic token refresh
- Comprehensive Examples: Ready-to-use examples for all supported resources and data sources
- Auto-generated Documentation: Complete provider documentation in the
docs/ directory
Resources
hush_deployment - Manage Hush sensor deployments
Data Sources
hush_deployment - Read existing Hush deployments
Requirements
- Terraform >= 1.3
- Go >= 1.24 (for development)
- Hush API credentials (
api_key_id and api_key_secret)
Authentication
The provider supports authentication via:
api_key_id – Your Hush API key ID
api_key_secret – Your Hush API key secret
realm – (Optional) Hush realm (US, EU), defaults to US
These can also be set via environment variables:
export HUSH_API_KEY_ID=your_api_key_id
export HUSH_API_KEY_SECRET=your_api_key_secret
Quick Start
terraform {
required_providers {
hush = {
source = "hushsecurity/hush"
}
}
}
provider "hush" {
api_key_id = var.api_key_id
api_key_secret = var.api_key_secret
realm = "US" # or "EU"
}
resource "hush_deployment" "example" {
name = "my-deployment"
description = "Example deployment"
env_type = "production"
kind = "K8S"
}
Examples
Complete examples are available in the examples/ directory:
Documentation
Auto-generated documentation is available in the docs/ directory and on the Terraform Registry.
Development
Building the Provider
go build -o terraform-provider-hush
Running Tests
make test
Generating Documentation
make docs
Local Development
For local testing, use the .terraformrc dev_overrides configuration to point Terraform to your local plugin build:
provider_installation {
dev_overrides {
"hushsecurity/hush" = "/path/to/your/terraform-provider-hush"
}
direct {}
}
License
Apache 2.0