The Unleash Terraform provider enables you to manage and configure Unleash programmatically, leveraging infrastructure as code (IaC) for automated and scalable configuration.
This provider is designed to help you with the initial setup and configuration of an instance. The provider does not support managing feature flags through Terraform. Since most feature flags are short-lived, we recommend managing them through the Unleash Admin UI.
For a detailed video tutorial, check out Managing Unleash through Terraform. For more examples of specific resources and data sources, visit the Terraform registry.
The permissions of the API token you use with Terraform and your Unleash plan determine which objects Terraform can manage:
unleash_api_token: Manage access and maintain secure communication with verified integrations.Example usage:
unleash_environment: Create and manage environments.unleash_project: Create and manage projects.unleash_project_access: Assign access roles and users to specific project resources.unleash_project_environment: Enable environments for projects and configure change requests.unleash_role: Define permissions systematically.unleash_user: Automate user management. Use send_email = true to generate an invitation link.unleash_service_account: Define and manage service accounts for secure automated access.unleash_service_account_token: Generate tokens associated with service accounts.unleash_oidc: Manage your OpenID Connect configuration.unleash_saml: Manage your SAML configuration.unleash_context_field: Create and manage context fields.For example usage and schemas, visit the resources documentation of the Unleash Terraform provider.
You can use the following data sources to fetch resources from Unleash:
unleash_environmentunleash_projectunleash_project_environmentunleash_userunleash_roleunleash_permissionunleash_context_fieldFor example usage and schemas, visit the data sources documentation of the Unleash Terraform provider.