diff --git a/prod/jdormit-website-netlify/terraform/.terraform.lock.hcl b/prod/jdormit-website-netlify/terraform/.terraform.lock.hcl new file mode 100755 index 0000000..36445e8 --- /dev/null +++ b/prod/jdormit-website-netlify/terraform/.terraform.lock.hcl @@ -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=", + ] +} diff --git a/prod/jdormit-website-netlify/terraform/main.tf b/prod/jdormit-website-netlify/terraform/main.tf new file mode 100644 index 0000000..8851ad0 --- /dev/null +++ b/prod/jdormit-website-netlify/terraform/main.tf @@ -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" + } +} diff --git a/prod/jdormit-website-netlify/terraform/terraform.tf b/prod/jdormit-website-netlify/terraform/terraform.tf new file mode 100644 index 0000000..4905190 --- /dev/null +++ b/prod/jdormit-website-netlify/terraform/terraform.tf @@ -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" + } +} diff --git a/prod/jdormit-website-netlify/terraform/variables.tf b/prod/jdormit-website-netlify/terraform/variables.tf new file mode 100644 index 0000000..37d7938 --- /dev/null +++ b/prod/jdormit-website-netlify/terraform/variables.tf @@ -0,0 +1,7 @@ +variable netlify_token { + type = string +} + +# variable netlify_base_url { +# type = string +# }