aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-01-13 01:22:11 -0800
committerclarkzjw <[email protected]>2023-01-13 01:22:11 -0800
commit410ddef7351ff7f784ff7a86ec7969230f3ac093 (patch)
tree566913f7526e0cf90f4c61abd6714ca63e6b6ddf
parente5a205d6a415fcaa786faafb3dc50f2e347b734a (diff)
downloadhomelab-410ddef7351ff7f784ff7a86ec7969230f3ac093.tar.gz
update files
-rw-r--r--clarkzjw.ca/cloudflare.tf22
-rw-r--r--clarkzjw.ca/variables.tf4
-rw-r--r--clarkzjw.ca/versions.tf8
3 files changed, 16 insertions, 18 deletions
diff --git a/clarkzjw.ca/cloudflare.tf b/clarkzjw.ca/cloudflare.tf
index 1a17e3c..68ab88f 100644
--- a/clarkzjw.ca/cloudflare.tf
+++ b/clarkzjw.ca/cloudflare.tf
@@ -1,35 +1,21 @@
1terraform {
2 required_providers {
3 cloudflare = {
4 source = "cloudflare/cloudflare"
5 version = "~> 3.29"
6 }
7 }
8}
9
10variable "homelab_main_domain" {
11 description = "HomeLab Main Domain"
12 default = "clarkzjw.ca"
13}
14
15data "cloudflare_zones" "homelab_main_domain" { 1data "cloudflare_zones" "homelab_main_domain" {
16 filter { 2 filter {
17 name = var.homelab_main_domain 3 name = var.homelab_main_domain
18 } 4 }
19} 5}
20 6
21variable "homelab_root" { 7variable "homelab_www_domain" {
22 default = "clarkzjw.ca" 8 default = "clarkzjw.ca"
23} 9}
24 10
25variable "homelab_root_ip" { 11variable "homelab_www_ip" {
26 default = "8.8.8.8" 12 default = "8.8.8.8"
27} 13}
28 14
29resource "cloudflare_record" "main" { 15resource "cloudflare_record" "main" {
30 zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id 16 zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
31 name = var.homelab_root 17 name = var.homelab_www_domain
32 value = var.homelab_root_ip 18 value = var.homelab_www_ip
33 type = "A" 19 type = "A"
34 20
35 ttl = 1 21 ttl = 1
diff --git a/clarkzjw.ca/variables.tf b/clarkzjw.ca/variables.tf
new file mode 100644
index 0000000..2847d76
--- /dev/null
+++ b/clarkzjw.ca/variables.tf
@@ -0,0 +1,4 @@
1variable "homelab_main_domain" {
2 description = "HomeLab Main Domain"
3 default = "clarkzjw.ca"
4}
diff --git a/clarkzjw.ca/versions.tf b/clarkzjw.ca/versions.tf
new file mode 100644
index 0000000..1551173
--- /dev/null
+++ b/clarkzjw.ca/versions.tf
@@ -0,0 +1,8 @@
1terraform {
2 required_providers {
3 cloudflare = {
4 source = "cloudflare/cloudflare"
5 version = "~> 3.29"
6 }
7 }
8}
Powered by cgit v1.2.3 (git 2.41.0)