Infrastructure as Code Overview
Manage FeatureSignals resources as code using Terraform, Pulumi, or Ansible. Define your feature flags, segments, environments, and API keys alongside your application infrastructure — version-controlled, repeatable, and auditable.
Why Infrastructure as Code?
Feature flags are infrastructure. When a flag controls whether a payment integration is active or a new checkout flow is visible, that flag should be managed with the same rigor as your database schema or Kubernetes manifests. IaC brings:
- Version control — Every flag change is a commit with context.
- Review workflow — Flag changes go through PR review before deployment.
- Drift detection — IaC reconciles desired state with actual state.
- Reproducibility — Spin up new environments with the exact flag configuration.
- Audit trail — Git history provides a complete record of who changed what and why.
Choose Your Provider
Terraform
Declarative HCL-based infrastructure provisioning. The FeatureSignals Terraform provider lets you manage flags, segments, environments, API keys, and webhooks as Terraform resources with full state management and drift detection.
View docsPulumi
Infrastructure as code in TypeScript, Python, Go, or C#. The FeatureSignals Pulumi provider brings feature flag management into your existing Pulumi stacks with full IDE autocompletion and type safety.
View docsAnsible
Agentless configuration management with YAML playbooks. The FeatureSignals Ansible collection provides modules for automating flag lifecycle, segment management, and environment configuration across your infrastructure.
View docsSupported Resources
| Resource | Description |
|---|---|
| Projects | Create and manage projects that organize your flags by application or service. |
| Environments | Define development, staging, and production environments with environment-specific flag overrides. |
| Feature Flags | Full flag lifecycle management — create, update, toggle, archive, and delete flags. |
| Segments | Target user cohorts with reusable targeting rules defined as code. |
| API Keys | Provision and rotate server-side and client-side API keys for your SDKs. |
| Webhooks | Configure webhook endpoints for flag change events, evaluation metrics, and audit log streaming. |
Getting Started
All IaC providers use the FeatureSignals API under the hood. You'll need an API key with the appropriate permissions. Create one from your FlagEngine dashboard or via the API:
# Set your API token as an environment variable export FEATURESIGNALS_API_TOKEN="fs_api_..."
Then follow the provider-specific guide for Terraform, Pulumi, or Ansible to start managing your flags as code.