Resource: yet_cloud_server

A machine of a local rack, which Yet's agent runs on. Made, it waits for its machine: run join_command there — in a VM's user data, say — and it comes online.

Note: The join command's token works once, and for a while. It is made when the server is; a machine that joins later needs a new one, from Yet's apps or the API.

Example Usage

resource "yet_cloud_server" "box" {
  name    = "box"
  rack_id = yet_cloud_rack.home.id
}

# A VM that joins Cloud as it boots.
resource "aws_instance" "box" {
  ami           = "ami-0abcdef1234567890"
  instance_type = "t4g.medium"
  user_data     = "#!/bin/sh\n${yet_cloud_server.box.join_command}"
}

Schema

Required

  • name (String) Its name: lowercase letters, digits and dashes, up to 32, starting with a letter.

Optional

  • rack_id (String) The local rack it joins; the company's only one when left out.

Read-Only

  • arch (String) The machine's architecture: amd64, arm64.
  • docker_command (String, Sensitive) The same, as the docker run itself.
  • hostname (String) The machine's own name, as its agent says.
  • id (String) The ID of this resource.
  • join_command (String, Sensitive) What to run on a Linux machine to join it: it checks Docker, then runs the agent. Its token works once, and for a while; made when the server is.
  • os (String) The machine's system: linux, darwin, windows.
  • status (String) pending until its agent first comes in; online or offline after.

Import

In Terraform v1.5.0 and later, with an import block:

import {
  to = yet_cloud_server.box
  id = "01J9Z8K3V7Q2M4N6P8R0S2T4V6"
}

With terraform import:

terraform import yet_cloud_server.box 01J9Z8K3V7Q2M4N6P8R0S2T4V6