A simple CDKTF application behind an API interface, as a demonstration for a blog post.
npm i
Or your favorite alternative dependency manager
npm run dev
This will server the API on localhost:3000
by default.
You can test the API by running:
curl -X POST -H "Content-Type: application/json" -d '{ "name": "my-stack", "buckets": ["test", "test1"] }' http://localhost:3000/generate > my-stack.zip
This should produce an output zip container a tf stack for deploying two s3 buckets named test
and test1
.