Thanks to a new community-created provider, customers can now use HashiCorp's Terraform to define, deploy, and manage BinaryLane resources directly through Terraform configurations, bringing Infrastructure as Code (IaC) principles to your BinaryLane environment. This allows for streamlined infrastructure management and version control, making your operations more efficient.

Although this provider is still in the early stages of development, it currently supports creating and managing BinaryLane servers. For more details on its current capabilities, visit Docs overview | oscarhermoso/binarylane | Terraform | Terraform Registry

The Terraform platform interacts with the BinaryLane API, enabling you to automate various aspects of your infrastructure. For more information about the BinaryLane API, refer to this helpdesk article we have on the matter: Getting Started with BinaryLane API : BinaryLane


What is Terraform?


Terraform is an infrastructure-as-code tool that allows you to manage your cloud resources using a declarative configuration language. This means you define your infrastructure in configuration files, which Terraform then uses to create and manage resources. If you're familiar with cloud-init, Terraform takes a similar approach but with broader capabilities across various cloud providers. 


Why would I want to use Terraform on BinaryLane?


Using Terraform on BinaryLane allows you to automate the provisioning and management of your infrastructure, reducing manual intervention and minimizing errors. It provides a consistent and repeatable process for deploying infrastructure, which is especially useful for environments that require scaling, version control, or team collaboration.

Additionally, HashiCorp has developed a comprehensive learning platform with tutorials to help you get started with Terraform. You can explore these resources here: Tutorials | Terraform | HashiCorp Developer

Getting Started


For official instructions on installing Terraform, refer to the HashiCorp Developer site.

To begin using the BinaryLane Terraform provider, include it in your Terraform configuration as follows:

terraform {
  required_providers {
    binarylane = {
      source = "oscarhermoso/binarylane"
      version = "0.5.4"
    }
  }
}

provider "binarylane" {
  # Configuration options
}


Here is an example of a basic configuration using this provider:

terraform {
  required_providers {
    binarylane = {
      source  = "oscarhermoso/binarylane"
      version = "0.5.4"
    }
  }
}

provider "binarylane" {
  # Optionally, you can add your API token or other provider-specific configurations here.
}

resource "binarylane_server" "example" {
  name      = "vps01.yourcompany.com"  # Optional: Set your desired server name
  image     = "ubuntu-22.04"           # Required: Choose an image from the available list
  region    = "syd"                    # Required: Choose a region from the available list
  size      = "std-2vcpu"              # Required: Choose a size from the available list

  backups   = true                     # Optional: Enable daily backups
  ssh_keys  = [12345]                  # Optional: Replace with your SSH key IDs
  password  = "YourSecurePassword"     # Optional: Set a password for the server
  wait_for_create = 60                 # Optional: Time to wait for server creation
}


Reporting Issues


If you encounter any issues or have feedback using the Terraform provider for BinaryLane, you can report them directly to the provider’s creator via GitHub Issues.