Skip to content

garysassano/cdktf-cloudflare-workers-kv-namespace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdktf-cloudflare-workers-kv-namespace

CDKTF app that deploys a Workers KV namespace to Cloudflare.

Prerequisites

For this project you need a Cloudflare account.

Installation

Install CDKTF:

npm install -g cdktf

Install Poetry + dotenv plugin:

curl -sSL https://install.python-poetry.org | python3 -
poetry self add poetry-plugin-dotenv

Configure Poetry to create the virtualenv inside the project's root directory:

poetry config virtualenvs.in-project true

Create the virtualenv and install all the dependencies inside it:

poetry install

Configuration

In order to deploy to Cloudflare, you need to create an API Token using the Edit Cloudflare Workers template.

After that, rename .env.example to .env and add your variables like in the following example:

CLOUDFLARE_ACCOUNT_ID=0123456789abcdef0123456789abcdef
CLOUDFLARE_API_TOKEN=_ABCDEF_0123456789abcdef0123456789abcdef

Deployment

Synthesize the Terraform stack and deploy it:

cdktf deploy

Cleanup

Destroy the Terraform stack:

cdktf destroy

About

CDKTF app that deploys a Workers KV namespace to Cloudflare

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages