ZITADEL Terraform Provider
The ZITADEL Terraform Provider is a tool that allows you to manage ZITADEL resources through Terraform. In other words, it lets you define and provision infrastructure for ZITADEL using Terraform configuration files.
This Terraform provider acts as a bridge, allowing you to manage various aspects of your ZITADEL instance directly through the ZITADEL API, using Terraform's declarative configuration language. It can be used to create, update, and delete ZITADEL resources, as well as to manage the relationships between those resources.
Before you start​
Make sure you create the following resources in ZITADEL and have Terraform installed:
- A ZITADEL Instance
- A service user with enough authorization to manage the desired resources
Manage ZITADEL resources through terraform​
The full documentation and examples are available on the Terraform registry.
To provide a small guide to where to start:
- Create a folder where all the terraform files reside.
- Configure the provider to use the right domain, port and token, with for example a
main.tf
file as shown in the example. - Add a
zitadel_org
resource to themain.tf
file, to create and manage a new organization in the instance, as shown in the example. - Add any resources to the organization in the
main.tf
file, as example a human user. - (Optional) Use Terraform in the directory with the command
terraform plan
, to see which resources would be created and how. - Apply the changes and start managing your resources with terraform with
terraform apply
. - (Optional) Delete your created resources with
terraform destroy
to clean-up.