Skip to content

equinix-labs/terraform-equinix-github-runner

Repository files navigation

terraform-equinix-github-runner

Experimental run-pre-commit-hooks generate-terraform-docs

terraform-equinix-github-runner is a minimal Terraform module that utilizes Terraform providers for Equinix to provision digital infrastructure and demonstrate higher level integrations.

Usage

This project is experimental and supported by the user community. Equinix does not provide support for this project.

Install Terraform using the tfenv utility.

This project may be forked, cloned, or downloaded and modified as needed as the base in your integrations and deployments.

This project may also be used as a Terraform module.

To use this module in a new project, create a file such as:

# main.tf
terraform {
  required_providers {
    equinix = {
      source = "equinix/equinix"
    }
}

module "example" {
  source = "github.com/equinix-labs/github-runner

  # Published modules can be sourced as:
  # source = "equinix-labs/template/equinix"
  # See https://www.terraform.io/docs/registry/modules/publish.html for details.

  # version = "0.1.0"

  # TEMPLATE: insert required variables here
}

Install pre-commit with its prerequesites: python and pip.

Configure pre-commit: pre-commit install.

Install required packages: tflint, tfsec, shfmt, shellcheck, and markdownlint.

Run terraform init -upgrade and terraform apply.

Module Documentation

The main README.md, the modules README.md and the examples README.md are populated by terraform-docs worflow job. The following sections are appended between the terraform-docs delimeters: Requiremenents, Providers, Modules, Resources, Inputs, and Outputs.

Module Release and Changelog Generation

The module git release and changelog are generated by the release workflow job. The release worflow follows the conventional commits convention. To submit a commit, please follow the commit message format guidelines. This job is set to run manually by default.

Example commit message: fix: disabled log generation for system services

For more examples, please see conventional commit message examples.

Examples

To view examples for how you can leverage this module, please see the examples directory.

Requirements

Name Version
terraform >= 0.14
equinix ~> 2.0
null ~> 3.2

Providers

Name Version
equinix ~> 2.0
null ~> 3.2

Modules

No modules.

Resources

Name Type
equinix_metal_device.runner resource
null_resource.delete_script resource
null_resource.wait resource

Inputs

Name Description Type Default Required
personal_access_token GitHub PAT (Personal Access Token) string n/a yes
project_id Your Equinix Metal project ID, where you want to deploy your server string n/a yes
runner_scope To specify repositories, use the format ':owner/:repo'. For example, 'equinix-labs/terraform-equinix-github-runner'. To specify an organization, use the format ':organization' string n/a yes
metro Metal's Metro location you want to deploy your servers to string "ny" no
operating_system OS you want to deploy string "ubuntu_20_04" no
plan Metal server type you plan to deploy string "c3.small.x86" no
server_count numbers of servers you want to deploy number 1 no

Outputs

Name Description
devices List of metal devices with self-hosted runner installed

Contributing

If you would like to contribute to this module, see CONTRIBUTING page.

License

Apache License, Version 2.0. See LICENSE.

About

Terraform Module for deploying a self-hosted Github runner

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published