Terraform
Manage your Avisi Cloud Infrastructure as Code using Terraform
Use our Terraform Provider to manage resources in an Avisi Cloud organisation. The provider source and documentation live at avisi-cloud/terraform-provider-acloud.
There are currently two examples for Terraform. See:
Supported resources
The Terraform Provider currently supports creating clusters, node pools, and environments. We are focusing on a strong user experience before adding more resources, such as managing users and cloud accounts.
Getting started with Terraform
Before you begin, create a personal access token in the Console by navigating to API Access. See personal access tokens.
Once you have your token, you can configure the provider in your Terraform configuration.
Provider configuration
Use a dedicated token per environment (dev/staging/prod) and store it in your secret manager or environment variables.
terraform {
required_providers {
acloud = {
source = "avisi-cloud/acloud"
version = ">= 0.10.1"
}
}
}
provider "acloud" {
token = var.acloud_token
}
variable "acloud_token" {
type = string
sensitive = true
}If you prefer environment variables, set TF_VAR_acloud_token in your shell or CI.
Minimal workflow
- Add the provider configuration to your Terraform project.
- Define your cluster, node pools, and environments.
- Run
terraform init, thenterraform plan, thenterraform apply.
Notes and troubleshooting
- Make sure your token has access to the organisation where you create resources.
- If
terraform initfails to download the provider, confirm your Terraform version is up to date and that you have network access to the registry. - For API errors, verify the token is valid and has not expired.
Last updated on