Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
layout page_title sidebar_current description
Provider: Netlify
The Netlify provider is used to deploy netlify resources

Netlify Provider

The Netlify provider allows you to provision and deploy netlify sites and manage webhooks. The provider needs to be configured with the proper credentials before it can be used.

Use the navigation to the left to read about the available resources.

Example Usage

# Configure the Netlify Provider
provider "netlify" {
  token    = "${var.netlify_token}"
  base_url = "${var.netlify_base_url}"

# Create a new deploy key for this specific website
resource "netlify_deploy_key" "key" {}

# Define your site
resource "netlify_site" "main" {
  name = "my-site"

  repo {
    repo_branch   = "master"
    command       = "middleman build"
    deploy_key_id = "${}"
    dir           = "build"
    provider      = "github"
    repo_path     = "username/reponame"

Argument Reference

The following arguments are supported in the provider block:

  • token - (Required) Environment Variable: NETLIFY_TOKEN
  • base_url - (Optional) Environment Variable: NETLIFY_BASE_URL