This is the official Terraform provider for peripheral. The provider allows you to manage Peripheral resources using Terraform. The provider is currently in alpha and is under active development.
The main resource currently manageable using this provider are GitLab Runners, and it interacts with
runrs
to manage them. It therefore enables you to manage
GitLab Runners entirely through Terraform.
As a prerequisite, you'll need to be running runrs
on your server running Docker or inside of your
Docker instance. Then, to use the provider, you need to add it to your Terraform configuration.
Your resulting Terraform code is going to look liket his:
# make sure you manage your token securely
variable "peripheral_token" {
type = string
sensitive = true
}
provider "peripheral" {
endpoint = "http://0.0.0.0:3000"
token = var.peripheral_token
}
resource "peripheral_runner" "runner" {
id = 42
url = "https://gitlab.com"
token = "glpat-1234567890abcdef"
description = "my-runner"
image = "alpine:latest"
tag_list = "tag1,tag2"
run_untagged = false
}
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run go install
. This will build the provider and put the provider binary
in the $GOPATH/bin
directory.
To generate or update documentation, run go generate
.
In order to run the full suite of Acceptance tests, run make testacc
.
Note: Acceptance tests create real resources, and often cost money to run.
make testacc
This is an open source project, so there isn't support per se. If you open an issue in the repository, we'll try and help you, but no promises.
solid engineering. sustainable code.