From 0f5c52d282fc6dcad8b66704652fea3b7ccdfde9 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Thu, 12 Jan 2023 16:21:17 -0800 Subject: init cloudflare --- clarkzjw.ca/cloudflare.tf | 30 ++++++++++++++++++++++++++++++ clarkzjw.ca/var/domain.tf | 4 ---- 2 files changed, 30 insertions(+), 4 deletions(-) delete mode 100644 clarkzjw.ca/var/domain.tf diff --git a/clarkzjw.ca/cloudflare.tf b/clarkzjw.ca/cloudflare.tf index e69de29..fb1a79f 100644 --- a/clarkzjw.ca/cloudflare.tf +++ b/clarkzjw.ca/cloudflare.tf @@ -0,0 +1,30 @@ +provider "cloudflare" {} + +variable "homelab_main_domain" { + description = "HomeLab Main Domain" + default = "clarkzjw.ca" +} + +data "cloudflare_zones" "homelab_main_domain" { + filter { + name = var.homelab_main_domain + } +} + +variable "homelab_root" { + default = "clarkzjw.ca" +} + +variable "homelab_root_ip" { + default = "1.1.1.1" +} + +resource "cloudflare_record" "s3_bucket" { + zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id + name = var.homelab_root + value = var.homelab_root_ip + type = "A" + + ttl = 1 + proxied = true +} diff --git a/clarkzjw.ca/var/domain.tf b/clarkzjw.ca/var/domain.tf deleted file mode 100644 index 2847d76..0000000 --- a/clarkzjw.ca/var/domain.tf +++ /dev/null @@ -1,4 +0,0 @@ -variable "homelab_main_domain" { - description = "HomeLab Main Domain" - default = "clarkzjw.ca" -} -- cgit v1.2.3