Capture netlify site in terraform
This commit is contained in:
parent
a6ad8aec39
commit
5388db88ce
10
prod/jdormit-website-netlify/terraform/.terraform.lock.hcl
Executable file
10
prod/jdormit-website-netlify/terraform/.terraform.lock.hcl
Executable file
@ -0,0 +1,10 @@
|
||||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "terraform.localhost/jdormit/netlify" {
|
||||
version = "1.0.0"
|
||||
constraints = "1.0.0"
|
||||
hashes = [
|
||||
"h1:MRtVAqOh0Av8FPpFYR7GLu/9W/K/oZI5eepf34/MQ9A=",
|
||||
]
|
||||
}
|
15
prod/jdormit-website-netlify/terraform/main.tf
Normal file
15
prod/jdormit-website-netlify/terraform/main.tf
Normal file
@ -0,0 +1,15 @@
|
||||
provider "netlify" {
|
||||
token = var.netlify_token
|
||||
}
|
||||
|
||||
resource "netlify_site" "jdormit_website" {
|
||||
name = "jdormit-website"
|
||||
custom_domain = "www.jeremydormitzer.com"
|
||||
|
||||
repo {
|
||||
repo_branch = "deploy"
|
||||
dir = "out"
|
||||
provider = "github"
|
||||
repo_path = "jdormit/jeremy-website"
|
||||
}
|
||||
}
|
18
prod/jdormit-website-netlify/terraform/terraform.tf
Normal file
18
prod/jdormit-website-netlify/terraform/terraform.tf
Normal file
@ -0,0 +1,18 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
netlify = {
|
||||
source = "terraform.localhost/jdormit/netlify"
|
||||
version = "1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
backend "s3" {
|
||||
skip_credentials_validation = true
|
||||
skip_metadata_api_check = true
|
||||
# Need to specify an AWS region to stop Terraform complaining
|
||||
region = "us-east-1"
|
||||
endpoint = "nyc3.digitaloceanspaces.com"
|
||||
bucket = "jdormit-tf-state"
|
||||
key = "prod/jdormit-website-netlify.tfstate"
|
||||
}
|
||||
}
|
7
prod/jdormit-website-netlify/terraform/variables.tf
Normal file
7
prod/jdormit-website-netlify/terraform/variables.tf
Normal file
@ -0,0 +1,7 @@
|
||||
variable netlify_token {
|
||||
type = string
|
||||
}
|
||||
|
||||
# variable netlify_base_url {
|
||||
# type = string
|
||||
# }
|
Loading…
Reference in New Issue
Block a user