terraform-provider-cloudrift

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Terraform Provider - CloudRift

Terraform provider for CloudRift

Example

To spin up a Virtual Machine with Ubuntu as the base image you can use the terraform provider to provision the infrastructure.

terraform {
    required_providers {
        cloudrift = {
            source = "berops/cloudrift"
            # version = "..."
        }
    }
}

provider "cloudrift" {
    # set CLOUDRIFT_TOKEN env or:
    # token = ""
}


resource "cloudrift_ssh_key" "primary" {
    name        = "primary"
    public_key = trimspace(file("~/.ssh/id_ed25519.pub"))
}

resource "cloudrift_virtual_machine" "machine0" {
    recipe          = "Ubuntu 22.04 Server (NVidia)"
    datacenter      = "us-east-nc-nr-1"
    # Instance types change frequently. To check available instances, use:
    # data "cloudrift_instance_types" "all" {}
    # output "instance_types" { value = data.cloudrift_instance_types.all.instance_types }
    instance_type   = "rtx49-10c-kn.1"
    ssh_key_id      = cloudrift_ssh_key.primary.id

    metadata = {
      # enable login as root with the provided key.
      startup_commands = base64encode("echo 'PermitRootLogin without-password' >> /etc/ssh/sshd_config && echo   'PubkeyAuthentication yes' >> /etc/ssh/sshd_config && (echo -n '${cloudrift_ssh_key.primary.public_key}' >   /root/.ssh/authorized_keys)")
    }
}

output "machine0_ip" {
    value = cloudrift_virtual_machine.machine0.public_ip
}

output "machine0" {
    value = cloudrift_virtual_machine.machine0.virtual_machines
}

After the Virtual Machine is created, you can SSH into it as root using the selected private key.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg
cloudriftapi
Package cloudriftapi provides primitives to interact with the openapi HTTP API.
Package cloudriftapi provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL