Skip to content

Repository files navigation

Terraform Provider: Huddle01 Cloud

This provider manages Huddle01 Cloud IaaS resources via the public API.

Provider source

terraform {
  required_providers {
    huddle = {
      source  = "huddle01/cloud"
      version = ">= 0.1.0"
    }
  }
}

Authentication

provider "huddle" {
  api_key  = var.huddle_api_key
  region   = "eu2"
  base_url = "https://cloud.huddleapis.com/api/v1"
}

Environment variables:

  • HUDDLE_API_KEY
  • HUDDLE_REGION

Resources

  • huddle_cloud_network
  • huddle_cloud_security_group
  • huddle_cloud_security_group_rule
  • huddle_cloud_keypair
  • huddle_cloud_instance
  • huddle_cloud_volume
  • huddle_cloud_volume_attachment

Volume lifecycle usage

Create and manage a standalone volume:

resource "huddle_cloud_volume" "data" {
  name        = "tf-data-volume"
  size        = 100
  description = "Application data disk"
  volume_type = "standard"
  region      = var.region
}

Attach and detach explicitly with a separate attachment resource:

resource "huddle_cloud_volume_attachment" "data_to_vm" {
  volume_id   = huddle_cloud_volume.data.id
  instance_id = huddle_cloud_instance.example.id
  region      = var.region
}

Storage model note

huddle_cloud_instance.additional_volume_size has been removed.

Use explicit resources:

  1. Create volume(s) with huddle_cloud_volume
  2. Attach to instances with huddle_cloud_volume_attachment

Data sources

  • huddle_cloud_regions
  • huddle_cloud_flavors
  • huddle_cloud_flavor
  • huddle_cloud_images
  • huddle_cloud_image
  • huddle_cloud_keypair
  • huddle_cloud_networks
  • huddle_cloud_security_group
  • huddle_cloud_instance

Notable behavior

  • huddle_cloud_instance now accepts either flavor_name or flavor_id, and either image_name or image_id.
  • huddle_cloud_instance supports first-boot user_data and API-managed password login through sensitive admin_pass.
  • huddle_cloud_images now exposes both the original grouped image_groups output and a flat images list with optional filters.
  • huddle_cloud_regions still exposes the raw regions boolean map for compatibility, and now also exposes region_details plus enabled_regions.
  • huddle_cloud_flavors now exposes is_public.

Examples

  • examples/minimal-vm
  • examples/custom-security-rules
  • examples/existing-network-instance
  • examples/password-login
  • examples/volume-lifecycle

Local development (before registry publish)

The local development workflow is unchanged for volume resources (huddle_cloud_volume, huddle_cloud_volume_attachment): use the same local mirror installation steps below.

If terraform init fails with:

registry.terraform.io does not have a provider named registry.terraform.io/huddle01/cloud

the provider is not published in the public Terraform Registry yet. Use a local filesystem mirror:

  1. Install locally from cloud/terraform/provider:
make install-local

Use another version label if needed:

make install-local VERSION=0.1.1
  1. Add provider installation config to ~/.terraformrc (or a file referenced by TF_CLI_CONFIG_FILE):
provider_installation {
  filesystem_mirror {
    path    = "$HOME/.terraform.d/plugins"
    include = ["huddle01/cloud"]
  }
  direct {
    exclude = ["huddle01/cloud"]
  }
}
  1. Run terraform init in an example directory again.

About

The Huddle01 Cloud provider lets you manage infrastructure on Huddle01 Cloud using Terraform. It supports virtual machines, block storage, private networks, security groups, and SSH keypairs.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages