chronark / terraform-provider-vercel

A terraform provider for vercel's hosting platform
ff789693-5a72-142e-e45d-326ead4ae7a4.vercel.app
Mozilla Public License 2.0
25 stars 9 forks source link

Terraform logo

DEPRECATED, please use the official provider by vercel

Terraform Provider for Vercel

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

  1. Create a token here
  2. Create a vercel.tf file with the following content.
    • Replace <YOUR_TOKEN> with the token from step 1. Alternatively you can set the VERCEL_TOKEN environment variable
    • Change the git_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"
  }
}
  1. Run

    terraform init
    terraform apply
  2. Check vercel's dashboard to see your project.

  3. Push to the default branch of your repository to create your first deployment.

Documentation

Documentation can be found here

Development Requirements