Configure vercel resources such as projects, deployments and secrets as code with terraform.
Features
This provider has not reached feauture parity with the vercel api yet. I am adding new features as I need them.
Please create an issue if you requrie a certain feature, I will work on them asap.
Available features can be found here.
Quickstart
- Create a token here
- Create a
vercel.tf
file with the following content.
- Replace
<YOUR_TOKEN>
with the token from step 1.
- Change the
git_repository
to whatever you want to deploy.
terraform {
required_providers {
vercel = {
source = "hashicorp.com/chronark/vercel"
version = "1.0.0"
}
}
}
provider "vercel" {
token = "<YOUR_TOKEN>"
}
resource "vercel_project" "my_project" {
name = "mercury-via-terraform"
git_repository {
type = "github"
repo = "chronark/mercury"
}
}
- Run
terraform init
terraform apply
- Check vercel's dashboard to see your project.
- Push to the default branch of your repository to create your first deployment.
Documentation
Documentation can be found here
Development Requirements