aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-01-13 01:19:15 -0800
committerclarkzjw <[email protected]>2023-01-13 01:19:15 -0800
commite5a205d6a415fcaa786faafb3dc50f2e347b734a (patch)
tree0ef07f6d65d44ef9bc04b9a41342dcf91141ca0f
parent0f5c52d282fc6dcad8b66704652fea3b7ccdfde9 (diff)
downloadhomelab-e5a205d6a415fcaa786faafb3dc50f2e347b734a.tar.gz
init cloudflare config
-rw-r--r--.gitignore36
-rw-r--r--clarkzjw.ca/.terraform.lock.hcl24
-rw-r--r--clarkzjw.ca/cloudflare.tf13
3 files changed, 70 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 9f11b75..8e5dbd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,37 @@
1.idea/ 1.idea/
2admin-rc
3
4# Local .terraform directories
5**/.terraform/*
6
7# .tfstate files
8*.tfstate
9*.tfstate.*
10
11# Crash log files
12crash.log
13crash.*.log
14
15# Exclude all .tfvars files, which are likely to contain sensitive data, such as
16# password, private keys, and other secrets. These should not be part of version
17# control as they are data points which are potentially sensitive and subject
18# to change depending on the environment.
19*.tfvars
20*.tfvars.json
21
22# Ignore override files as they are usually used to override resources locally and so
23# are not checked in
24override.tf
25override.tf.json
26*_override.tf
27*_override.tf.json
28
29# Include override files you do wish to add to version control using negated pattern
30# !example_override.tf
31
32# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
33# example: *tfplan*
34
35# Ignore CLI configuration files
36.terraformrc
37terraform.rc
diff --git a/clarkzjw.ca/.terraform.lock.hcl b/clarkzjw.ca/.terraform.lock.hcl
new file mode 100644
index 0000000..5a1955d
--- /dev/null
+++ b/clarkzjw.ca/.terraform.lock.hcl
@@ -0,0 +1,24 @@
1# This file is maintained automatically by "terraform init".
2# Manual edits may be lost in future updates.
3
4provider "registry.terraform.io/cloudflare/cloudflare" {
5 version = "3.32.0"
6 constraints = "~> 3.29"
7 hashes = [
8 "h1:m+MuihUEa0RARMGxpGKAOeCq99d94njRXJjKCAc6Xtk=",
9 "zh:0be6ee63a380c7cf8b0666dd296ab5cdb9ec0a18ae99cd11d732783debd783f4",
10 "zh:0dca442861a263aaadf5c95ce962b979b8380c9c6e472018cba345aa9b6484ef",
11 "zh:549b44da944698d07d58d678f528e14d81c76d8e16d0dcab3d47a2956b20c2dd",
12 "zh:604206dca9896baec3759c34d83477535eaba9c40843d299bf5dd302830883fd",
13 "zh:6bff7b21254f218eba7da0227694abe33de7750a59d8d54dd04c814a0b5fe3dc",
14 "zh:7364c2bbae08208384831ccad983963c9746a83ac02e8061b6cc78407b202605",
15 "zh:7fba3591440ef6485eac5ab5794f7f43b4e0195365b5451bac29bd2dbccdbe14",
16 "zh:844a6ede2b60df8507865b0b2c137c76412ec55e8601ca132c113bc5d4d5f594",
17 "zh:90947dd9bfe6a5ab0b77c6c36bbbf07d67c94d6d22cc4fbe3c7572accda7f9b4",
18 "zh:987fd764c9f2595eba98774fa07bb669ae97546e06289b10a5536f1c1c2cb618",
19 "zh:993c8b9e7ab31ac39cd586a07578113341bb5870bc2348875a4ad4f2234efe0e",
20 "zh:be77e1575e93485e8a507e995e5f6cefc9f14681dc26396813cbf079fda87c20",
21 "zh:c300598e693c177f8a6dd3ff42e9f95cbaf7789d77124ad48899b9f4f8400ec0",
22 "zh:f589e8754cb4dc6baf43c0f08004073bb2e8a703aa71680f9ac2efd49fdc7bdf",
23 ]
24}
diff --git a/clarkzjw.ca/cloudflare.tf b/clarkzjw.ca/cloudflare.tf
index fb1a79f..1a17e3c 100644
--- a/clarkzjw.ca/cloudflare.tf
+++ b/clarkzjw.ca/cloudflare.tf
@@ -1,4 +1,11 @@
1provider "cloudflare" {} 1terraform {
2 required_providers {
3 cloudflare = {
4 source = "cloudflare/cloudflare"
5 version = "~> 3.29"
6 }
7 }
8}
2 9
3variable "homelab_main_domain" { 10variable "homelab_main_domain" {
4 description = "HomeLab Main Domain" 11 description = "HomeLab Main Domain"
@@ -16,10 +23,10 @@ variable "homelab_root" {
16} 23}
17 24
18variable "homelab_root_ip" { 25variable "homelab_root_ip" {
19 default = "1.1.1.1" 26 default = "8.8.8.8"
20} 27}
21 28
22resource "cloudflare_record" "s3_bucket" { 29resource "cloudflare_record" "main" {
23 zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id 30 zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
24 name = var.homelab_root 31 name = var.homelab_root
25 value = var.homelab_root_ip 32 value = var.homelab_root_ip
Powered by cgit v1.2.3 (git 2.41.0)