aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-01-12 16:21:17 -0800
committerclarkzjw <[email protected]>2023-01-12 16:21:17 -0800
commit0f5c52d282fc6dcad8b66704652fea3b7ccdfde9 (patch)
treeab614fdb93ea0735b70e76dae5bc828809605aee
parent72675ddcd2470ce6d5497f817f6f70327550b14c (diff)
downloadhomelab-0f5c52d282fc6dcad8b66704652fea3b7ccdfde9.tar.gz
init cloudflare
-rw-r--r--clarkzjw.ca/cloudflare.tf30
-rw-r--r--clarkzjw.ca/var/domain.tf4
2 files changed, 30 insertions, 4 deletions
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 @@
1provider "cloudflare" {}
2
3variable "homelab_main_domain" {
4 description = "HomeLab Main Domain"
5 default = "clarkzjw.ca"
6}
7
8data "cloudflare_zones" "homelab_main_domain" {
9 filter {
10 name = var.homelab_main_domain
11 }
12}
13
14variable "homelab_root" {
15 default = "clarkzjw.ca"
16}
17
18variable "homelab_root_ip" {
19 default = "1.1.1.1"
20}
21
22resource "cloudflare_record" "s3_bucket" {
23 zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
24 name = var.homelab_root
25 value = var.homelab_root_ip
26 type = "A"
27
28 ttl = 1
29 proxied = true
30}
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 @@
1variable "homelab_main_domain" {
2 description = "HomeLab Main Domain"
3 default = "clarkzjw.ca"
4}
Powered by cgit v1.2.3 (git 2.41.0)