Terraform
Terraform is a tool that creates, changes and deletes infrastructure from configuration files. You write what you want in .tf files, Terraform shows you a plan of the changes, and nothing happens until you apply it. The IBEE provider, devs-ibee/ibee version 0.11.0 on the Terraform Registry, teaches Terraform to manage IBEE compute, networking, storage, Secret Manager, CDN and Container Registry. It is built on API contract 0.14.3.
When to use Terraform
How it works
- You describe resources in
.tffiles, for example anibee_vpcwith a name and a site. terraform planreads your files and the current state of your resources, and lists what it would create, change or delete.terraform applymakes those changes by calling the IBEE API, and waits for asynchronous work (such as a VM being built) to finish.- Terraform records what it created in a state file, so the next plan knows what already exists.
terraform destroydeletes everything in the state.
Before you begin
- Terraform 1.11 or later (install).
- An API token for the workspace you want Terraform to manage, with the permissions your resources need. The example below needs Networking → Edit. See Authentication.
- Your workspace ID. See Find your workspace ID.
Get started
This example creates one VPC (a private network) in the first available networking site, then deletes it.
Set your credentials
Production is the default. Set IBEE_ENV=dev with a development token to use the development API. Keep the token out of .tf files and source control.
Initialize, plan and apply
init downloads the provider from the Registry. plan should say Plan: 1 to add, 0 to change, 0 to destroy. Type yes when apply asks.
Some resources, such as VMs, volumes and NAT gateways (which give private VMs internet access through a shared public IP), are billed from creation. Review every plan before you apply it.
Provider settings
Every setting can come from the environment, so provider "ibee" {} is enough.
organization_id is deprecated and unused.
What the provider manages
Secret Manager isn’t in the provider yet: manage it with the IBEE API and Vault-compatible tools. The full list, with every argument, is in the provider documentation.
The provider manages infrastructure only, and it has no Terraform actions. One-off operations, such as starting or stopping a VM, taking a snapshot, restoring a backup or purging the CDN cache, belong in the CLI or the SDKs. Files go through the S3 API and images through the registry.
- Load balancers:
ibee_load_balanceris the regional load balancer, declared as one full specification (listeners, target groups and health checks). Take itsregion_idfrom theibee_load_balancer_regionsdata source. Create and update send the whole specification and wait for the operation to finish. Itsaddressis the public IP that clients connect to. - Secret Manager:
ibee_secret_managerturns Secret Manager on for the workspace; destroy leaves it on.ibee_secret_manager_secretmanages one secret’s type, settings and tags, andibee_secret_manager_app_credentialmanages an app login, whose secret ID is issued once and kept in state as sensitive. Terraform never reads or writes a secret value: values go through the Vault API at the workspace endpoint.
Errors and retries
The provider calls the API and relays its answer. A failed request shows the HTTP status, the server’s code and message, and the request ID. Reads are retried on 429, 502, 503 and 504, up to 3 times, waiting Retry-After or 250 ms doubling each time, at most 30 seconds. Writes are never retried, because after an error the write may already have been applied: check the resource, then run terraform apply again. Asynchronous work is checked every 2 seconds until operation_timeout.
Upgrading
From 0.11 to 0.12 has no breaking changes; change version to "~> 0.12.0" and run terraform init -upgrade:
- The first plan after upgrading may show one in-place change that only records a value (for example
confirm_unmounted = falseon a volume attachment). Applying it sends nothing to the API. ibee_cloud_vm/ibee_gpu_vm: a resize no longer ends in “inconsistent result”; import no longer replaces the VM.delete_public_ip_actionstill has no default: setrelease,reserve(withdelete_reserved_ip_billing_catalog) orkeep(the VM’s IP is already a Reserved IP) before destroying.- Volume attachments read from the volume; set
confirm_unmounted = trueto detach from a running VM after unmounting. - CDN, registry token, VPC and backup policy imports no longer plan a replacement;
422errors list their field errors; the token also falls back toIBEE_API_TOKEN.
From 0.9 to 0.11 has breaking changes. Version 0.10.0 was not published; its changes are part of 0.11.0. Before you change version to "~> 0.11.0" and run terraform init -upgrade:
- Removed: every action.
ibee_vm_power,ibee_vm_access,ibee_vm_backup_create,ibee_vm_backup_restore,ibee_vm_backup_restore_cancel,ibee_vm_snapshot_restore,ibee_cdn_purgeandibee_cdn_verify_domainare gone. Delete theiractionblocks and use the CLI or SDKs for these operations. Terraform 1.11 is still required; 1.14 is no longer needed. - Removed: snapshots.
ibee_cloud_vm_snapshot,ibee_gpu_vm_snapshotand theibee_snapshot_storage_plansdata source are gone. Backup policies stay. - Removed: Secret Store.
ibee_secret_store,ibee_secret,ibee_secret_identityandibee_secret_identity_scopeare gone, because Secret Manager replaced Secret Store in the API. Useibee_secret_manager,ibee_secret_manager_secretandibee_secret_manager_app_credential. - Removed:
ibee_load_balancer_l4andibee_load_balancer_l7. Useibee_load_balancer. - Run
terraform state rmfor each removed resource that you want to keep in IBEE, or Terraform reports an unsupported resource type. - New:
ibee_load_balancerand theibee_load_balancer_regionsdata source.regionsis now a list of objects (id,code,name,site_id,max_nodesandcapabilities), not a list of string maps, so you can filter oncapabilities.private_targets. - New: the Secret Manager resources,
ibee_bucket_object_lock(a bucket’s default retention) andibee_bucket_custom_domain. - New:
shared_access_confirmedonibee_cloud_vm_volume_attachmentandibee_gpu_vm_volume_attachment. The API requirestruewithmode = "multi-writer". - New on
ibee_load_balancer:firewall, target-groupproxy_protocol, health-checkhostnameandexpected_statuses, and the computedaddress. - Errors show the server’s
billing_reasonandrequired_scopenext to the code. - Object Storage and Container Registry are no longer paused. Their resources plan and apply as usual.
From 0.8 to 0.9: no breaking changes. Change version to "~> 0.9.0" and run terraform init -upgrade. 0.9.0 fixes a plan_id change on ibee_cloud_vm and ibee_gpu_vm: the resize now sends the new plan’s billing_catalog with the VM’s billing_interval term, which the API requires; 0.8.0’s resize was refused with 400.
From 0.7 to 0.8: no breaking changes. Change version to "~> 0.8.0" and run terraform init -upgrade before your next plan or apply. 0.8.0 keeps your state during the Object Storage and Container Registry pause of November 2026, and adds the actions ibee_vm_backup_create and ibee_vm_backup_restore_cancel.
From 0.6 to 0.7 has breaking changes. Before you change version to "~> 0.7.0" and run terraform init -upgrade:
- Removed:
ibee_billing_eligibility,ibee_block_volume_attachment(attach volumes withibee_cloud_vm_volume_attachmentoribee_gpu_vm_volume_attachment), theibee_vm_backup_runaction,ibee_bucket_retention(useibee_bucket.default_retention) andibee_cdn_origin. Runterraform state rmfor these first. ibee_cloud_vm,ibee_gpu_vm:os_typeis required.billing_intervalisHOURLYorMONTHLY(a one-month commitment) and defaults toHOURLYfor new VMs; the provider buildsbilling_catalogfrom the plan, as the portal does.delete_public_ip_actionhas no default: setreleaseorreservefor a VM with an automatically assigned public IP, or destroy fails with400.ibee_compute_plans,ibee_images:vm_typeis required.- Volume attachments: set
billing_catalog, for example toibee_block_volume.<name>.billing_catalog. - Changes that now replace the resource, because the API has no update for them:
ibee_vpc_subnetname and DNS. - Load balancers: set the new
tlsblock forhttps(for example{ mode = "terminate", certificate_source = "managed" }). - No provider defaults or checks: settings you leave out aren’t sent, and the API’s values are recorded.
- New: Container Registry resources; the
ibee_block_storage_plans,ibee_snapshot_storage_plansandibee_backup_storage_plansdata sources;ibee_bucket_cors,ibee_bucket_lifecycleandibee_bucket_notificationsare supported again.
From 0.5 to 0.6: no breaking changes. 0.6.0 added the actions ibee_vm_snapshot_restore, ibee_vm_backup_restore, ibee_vm_access and ibee_vm_backup_run (removed again in 0.7).
Troubleshooting
Related pages
- Provider documentation on the Terraform Registry
- Terraform examples: a web app, a private network, a static site, and a private bucket
- Provider source on GitHub
- Authentication: tokens and permissions
- Asynchronous operations: what
operation_timeoutwaits for
