Configure vercel resources such as projects, deployments and secrets as code with terraform.
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.
vercel.tf
file with the following content.
<YOUR_TOKEN>
with the token from step 1. Alternatively you can set the VERCEL_TOKEN
environment variablegit_repository
to whatever you want to deploy.terraform {
required_providers {
vercel = {
source = "registry.terraform.io/chronark/vercel"
version = ">=0.10.3"
}
}
}
provider "vercel" {
token = "<YOUR_TOKEN>"
}
resource "vercel_project" "my_project" {
name = "mercury-via-terraform"
git_repository {
type = "github"
repo = "chronark/terraform-provider-vercel"
}
}
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 can be found here