terraform-provider-ctfd

command module
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Terraform Provider for CTFd

Time for CTF(d) as Code

reference go report Coverage Status
License CI CodeQL
OpenSSF Scoreboard

Warning:

This Terraform Provider is not ready for production !

Why creating this ?

Terraform is used to manage resources that have lifecycles, configurations, to sum it up.

That is the case of CTFd: it handles challenges that could be created, modified and deleted. With some work to leverage the unsteady CTFd's API, Terraform is now able to manage them as cloud resources bringing you to opportunity of CTF as Code.

With a paradigm-shifting vision of setting up CTFs, the Terraform Provider for CTFd avoid shitty scripts, ctfcli and other tools that does not solve the problem of reproductibility, ease of deployment and resiliency.

How to use it ?

Install the Terraform Provider for CTFd by setting the following in your main.tf file.

terraform {
    required_providers {
        ctfd = {
            source = "registry.terraform.io/ctfer-io/ctfd"
        }
    }
}

provider "ctfd" {
    url = "https://my-ctfd.lan"
}

We recommend setting the environment variable CTFD_API_KEY to enable the provider to communicate with your CTFd instance.

Then, you could use a ctfd_challenge resource to setup your CTFd challenge, with for instance the following configuration.

resource "ctfd_challenge" "my_challenge" {
    name        = "My Challenge"
    category    = "Some category"
    description = <<-EOT
        My superb description !

        And it's multiline :o
    EOT
    state       = "visible"
    value       = 500
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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