diff options
author | clarkzjw <[email protected]> | 2023-01-12 16:21:17 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-01-12 16:21:17 -0800 |
commit | 0f5c52d282fc6dcad8b66704652fea3b7ccdfde9 (patch) | |
tree | ab614fdb93ea0735b70e76dae5bc828809605aee | |
parent | 72675ddcd2470ce6d5497f817f6f70327550b14c (diff) | |
download | homelab-0f5c52d282fc6dcad8b66704652fea3b7ccdfde9.tar.gz |
init cloudflare
-rw-r--r-- | clarkzjw.ca/cloudflare.tf | 30 | ||||
-rw-r--r-- | clarkzjw.ca/var/domain.tf | 4 |
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 @@ | |||
1 | provider "cloudflare" {} | ||
2 | |||
3 | variable "homelab_main_domain" { | ||
4 | description = "HomeLab Main Domain" | ||
5 | default = "clarkzjw.ca" | ||
6 | } | ||
7 | |||
8 | data "cloudflare_zones" "homelab_main_domain" { | ||
9 | filter { | ||
10 | name = var.homelab_main_domain | ||
11 | } | ||
12 | } | ||
13 | |||
14 | variable "homelab_root" { | ||
15 | default = "clarkzjw.ca" | ||
16 | } | ||
17 | |||
18 | variable "homelab_root_ip" { | ||
19 | default = "1.1.1.1" | ||
20 | } | ||
21 | |||
22 | resource "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 @@ | |||
1 | variable "homelab_main_domain" { | ||
2 | description = "HomeLab Main Domain" | ||
3 | default = "clarkzjw.ca" | ||
4 | } | ||