Merge pull request #7628 from hashicorp/fix-netlify-tf
remove name argument for github_repository_webhook
This commit is contained in:
commit
2568fe3f54
@ -13,6 +13,8 @@ GitHub Resources
|
|||||||
|
|
||||||
provider "github" {
|
provider "github" {
|
||||||
organization = "${local.github_org}"
|
organization = "${local.github_org}"
|
||||||
|
|
||||||
|
version = "~> 2.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure the repository with the dynamically created Netlify key.
|
// Configure the repository with the dynamically created Netlify key.
|
||||||
@ -26,12 +28,12 @@ resource "github_repository_deploy_key" "key" {
|
|||||||
// Create a webhook that triggers Netlify builds on push.
|
// Create a webhook that triggers Netlify builds on push.
|
||||||
resource "github_repository_webhook" "main" {
|
resource "github_repository_webhook" "main" {
|
||||||
repository = "${local.github_repo}"
|
repository = "${local.github_repo}"
|
||||||
name = "web"
|
|
||||||
events = ["delete", "push", "pull_request"]
|
events = ["delete", "push", "pull_request"]
|
||||||
|
|
||||||
configuration {
|
configuration {
|
||||||
content_type = "json"
|
content_type = "json"
|
||||||
url = "https://api.netlify.com/hooks/github"
|
url = "https://api.netlify.com/hooks/github"
|
||||||
|
insecure_ssl = false
|
||||||
}
|
}
|
||||||
|
|
||||||
depends_on = ["netlify_site.main"]
|
depends_on = ["netlify_site.main"]
|
||||||
@ -43,11 +45,16 @@ Netlify Resources
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
provider "netlify" {
|
||||||
|
version = "~> 0.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
// A new, unique deploy key for this specific website
|
// A new, unique deploy key for this specific website
|
||||||
resource "netlify_deploy_key" "key" {}
|
resource "netlify_deploy_key" "key" {}
|
||||||
|
|
||||||
resource "netlify_site" "main" {
|
resource "netlify_site" "main" {
|
||||||
name = "${var.name}"
|
name = "${var.name}"
|
||||||
|
custom_domain = "${var.custom_site_domain}"
|
||||||
|
|
||||||
repo {
|
repo {
|
||||||
repo_branch = "${var.github_branch}"
|
repo_branch = "${var.github_branch}"
|
||||||
|
@ -12,3 +12,8 @@ variable "github_branch" {
|
|||||||
default = "stable-website"
|
default = "stable-website"
|
||||||
description = "GitHub branch which netlify will continuously deploy."
|
description = "GitHub branch which netlify will continuously deploy."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "custom_site_domain" {
|
||||||
|
default = "packer.io"
|
||||||
|
description = "The custom domain to use for the Netlify site."
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user