Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctfer-io/terraform-provider-ctfd
Time for CTF(d) as Code
https://github.com/ctfer-io/terraform-provider-ctfd
ctf ctfd infrastructure-as-code opentofu provider terraform tofu
Last synced: 3 months ago
JSON representation
Time for CTF(d) as Code
- Host: GitHub
- URL: https://github.com/ctfer-io/terraform-provider-ctfd
- Owner: ctfer-io
- License: apache-2.0
- Created: 2023-05-22T12:23:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-21T19:39:37.000Z (3 months ago)
- Last Synced: 2024-10-22T12:58:27.334Z (3 months ago)
- Topics: ctf, ctfd, infrastructure-as-code, opentofu, provider, terraform, tofu
- Language: Go
- Homepage: https://registry.terraform.io/providers/ctfer-io/ctfd
- Size: 278 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
## 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`.
```hcl
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.
```hcl
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
}
```