Terraform (IaC)
GlobalAI allows you to provision and manage underlying infrastructure resources, such as virtual machines, networks, and databases, directly through the platform using Infrastructure as Code (IaC) principles.
By integrating Terraform templates, GlobalAI enables consistent, repeatable, and auditable infrastructure provisioning while providing safeguards for reviewing and applying changes.
Manage infrastructure templates
Infrastructure templates define how resources are provisioned and configured. Unlike Kubernetes templates, which manage containerized workloads, Terraform templates focus on creating and updating the underlying infrastructure required to run those workloads.
You can create Terraform templates in two ways:
- Upload: Upload configuration files as
.zipor.tar.gzarchives. - Editor: Write or modify Terraform configuration files directly in the platform.
Templates support input variables, allowing you to adapt deployments for different environments without changing the underlying configuration files.
Preview changes with plan and apply
Because infrastructure changes can impact critical systems, GlobalAI follows Terraform’s plan and apply workflow to reduce risk and increase transparency.
-
Plan: When you update a Terraform deployment, the platform first generates a plan. This plan shows exactly what Terraform will create, modify, or destroy. You can review these logs directly in the console.
-
Apply: After validating the plan, you apply it to execute the changes and update the live infrastructure.
Deployment lifecycle options
Terraform deployments support a limited set of lifecycle options that control how long resources remain provisioned.
| Option | Behavior | Best Use Case |
|---|---|---|
| Manual | Resources remain provisioned until explicitly destroyed. | Long-lived infrastructure such as production environments. |
| Terminate | All resources are automatically destroyed after the configured time expires. | Temporary environments, test infrastructure, or short-lived demos. |
Terraform deployments do not support a pause or stop option. Resources are either kept running or fully destroyed.
Monitor configuration drift
Over time, infrastructure may change outside of Terraform, causing the live environment to drift from the defined configuration.
GlobalAI provides drift detection by generating a new Terraform plan that highlights differences between the template and the current infrastructure state. This allows you to review discrepancies and decide whether to reconcile them.
Related articles
Now that you understand how GlobalAI manages infrastructure with Terraform, explore these related guides.