Skip to content

Latest commit

 

History

History

README.md

Stand 1 — Terraform

Manages a local Semaphore UI instance via the semaphoreui/semaphore Terraform provider.

Prerequisites

  • Terraform >= 1.0
  • Semaphore running at http://localhost:3000 (default API base URL)
  • An API token (browser console while logged in):
fetch("/api/user/tokens", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({}),
})
  .then((res) => res.json())
  .then((data) => console.log("api_token = " + data.id));

Setup

cd stands/stand1
cp terraform.tfvars.example terraform.tfvars   # edit api_token
terraform init

Alternatively, export credentials and omit terraform.tfvars:

export SEMAPHOREUI_API_BASE_URL="http://localhost:3000/api"
export SEMAPHOREUI_API_TOKEN="your token"
terraform init

Add .tf files here for projects, repositories, inventories, templates, and other Semaphore resources as the stand grows.