Code Monkey home page Code Monkey logo

terraform-provider-vercel's Introduction

Vercel Terraform Provider

Requirements

  • Terraform 1.1 or higher
  • Go 1.19 (to build the provider plugin)
  • Task v3 (to run Taskfile commands)

Building The Provider

Clone repository locally and run

$ task build

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.19+ is required).

To compile the provider, run task build. This will build the provider and put the provider binary in the repository root.

In addition, you can run task install to set up a developer overrides in your ~/.terraformrc. This will then allow you to use your locally built provider binary.

When you are finished using a local version of the provider, running task uninstall will remove all developer overrides.

Testing

In order to test the provider, you can simply run task test.

Note: This runs acceptance tests that will create real resources. You should expect that the full acceptance test suite will take some time to run.

The acceptance tests require a few environment variables to be set:

  • VERCEL_API_TOKEN - this can be generated here
  • VERCEL_TERRAFORM_TESTING_TEAM - a Vercel team_id where resources can be created and destroyed
  • VERCEL_TERRAFORM_TESTING_GITHUB_REPO - a GitHub repository in the form 'org/repo' that can be used to trigger deployments
  • VERCEL_TERRAFORM_TESTING_BITBUCKET_REPO - a Bitbucket repository in the form 'project/repo' that can be used to trigger deployments
$ task test

In order to run the tests with extra debugging context, prefix with TF_LOG (see the terraform documentation for details).

$ TF_LOG=INFO task test

To run a specific set of tests, use the -run flag and specify a regex pattern matching the test names.

$ task test -- -run 'TestAcc_Project*'

Building The Documentation

The documentation is autogenerated from Description fields within the provider, and the examples directory. Building the documentation generates markdown in the docs folder, ready for deployment to Hashicorp.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.