Very simple (non-production ready) todo API - https://github.com/spkane/todo-for-terraform
1.6K
docker run --name todo-list -p 8080:80 spkane/todo-list-server:latest
./bin/build.sh
curl -i http://127.0.0.1:8080/
curl -i http://127.0.0.1:8080/ -d "{\"description\":\"message $RANDOM\",\"completed\":false}" -H 'Content-Type: application/spkane.todo-list.v1+json'
curl -i http://127.0.0.1:8080/ -d "{\"description\":\"message $RANDOM\",\"completed\":false}" -H 'Content-Type: application/spkane.todo-list.v1+json'
curl -i http://127.0.0.1:8080/ -d "{\"description\":\"message $RANDOM\",\"completed\":false}" -H 'Content-Type: application/spkane.todo-list.v1+json'
curl -i http://127.0.0.1:8080/3 -X PUT -H 'Content-Type: application/spkane.todo-list.v1+json' -d '{"description":"go shopping",\"completed\":true}'
curl -i http://127.0.0.1:8080/1 -X DELETE -H 'Content-Type: application/spkane.todo-list.v1+json'
curl -i http://127.0.0.1:8080/3 -X DELETE -H 'Content-Type: application/spkane.todo-list.v1+json'
curl -i http://127.0.0.1:8080
In your terraform HCL you will need to reference the provider with something like this:
terraform {
required_providers {
todo = {
source = "spkane/todo"
version = "1.2.3"
}
}
}
Content type
Image
Digest
sha256:822011e13…
Size
10.4 MB
Last updated
over 3 years ago
docker pull spkane/todo-list-server