| title | Aiven Provider for Terraform |
|---|
import TerraformApply from "@site/static/includes/terraform-apply-changes.md"; import TerraformSample from '@site/src/components/CodeSamples/TerraformSample';
Use the Aiven Provider for Terraform to provision and manage your Aiven infrastructure.
:::tip You can also use an AI assistant connected to Aiven MCP to create, update, and view details for Aiven services from clients such as Cursor and Claude Code. :::
The Aiven Platform uses organizations, organizational units, and projects to organize services. This example shows you how to use the Aiven Provider for Terraform to create an organization with two organizational units, and add projects to those units. The following example file is also available in the Aiven Terraform Provider repository on GitHub.
-
Create a file named
main.tfand add the following: -
Create a file named
variables.tfand add the following: -
Create the
terraform.tfvarsfile and assign values to the variables for the token and the project names.
- Follow an example to set up your own organization with a user group and permissions.
- Try one of the other examples to learn how to create a service or integration using the Aiven Terraform Provider.
- Get details about all the available resources and data sources in the Aiven Provider for Terraform documentation.
- Learn how to manage Aiven services with AI assistance using Aiven MCP.