Skip to content
This repository was archived by the owner on Dec 9, 2020. It is now read-only.

Files

Latest commit

09c9846 · Nov 5, 2018

History

History
47 lines (36 loc) · 1.18 KB

index.html.markdown

File metadata and controls

47 lines (36 loc) · 1.18 KB
layout page_title sidebar_current description
netlify
Provider: Netlify
docs-netlify-index
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 = "${netlify_deploy_key.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