Terraform
Use Terraform to describe IBEE infrastructure in configuration files and review changes before applying them. The IBEE provider supports resources across compute, networking, storage, secrets, and CDN.
Before you begin
- Install Terraform CLI 1.11 or later. Terraform 1.14 or later is required for Terraform actions.
- Have an IBEE organization and workspace.
- Install Go if you need to build the provider from source.
Get started
1. Create an API token
In the IBEE portal, open Settings → API Tokens and create a token authorized for the workspace you want Terraform to manage. Grant Billing: Read for billing checks and the read/write permissions required by the resources in your configuration. See API Tokens for token setup and scope details.
Copy the token when it is created. It is shown only once.
2. Build and configure the provider
The provider is currently installed from source. Clone the Terraform provider repository and build it:
Create a Terraform CLI configuration file (for example, dev.tfrc) that points to the provider binary directory. Replace the path with the absolute path to your checkout:
Export the CLI configuration, token, and workspace ID in your shell:
Production is the default environment. To use the development environment, also set IBEE_ENV=dev and use a development token. Keep the token in your shell or secret manager; do not put it in Terraform files or source control.
When using this local development override, skip terraform init. After a Registry release is available, configure the published provider version and run terraform init normally.
3. Create a Terraform project
Create a directory for your configuration, change into it, and add a file named main.tf:
Add this configuration to main.tf:
Set site_id to an available network site. You can find site IDs in the IBEE portal or with the ibee_network_sites data source.
Next steps
- Browse the Terraform provider documentation.
- Explore the Terraform example stacks.
- Read about API token scopes and network site availability.
