Compare commits
5 Commits
0f46a89e40
...
a3b8b89a3b
Author | SHA1 | Date | |
---|---|---|---|
a3b8b89a3b | |||
0c460cad19 | |||
c710bacd69 | |||
905c2dfe61 | |||
3e12c8a90c |
@ -1,3 +1,12 @@
|
|||||||
|
resource "cloudflare_access_group" "family" {
|
||||||
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
||||||
|
name = "family group"
|
||||||
|
|
||||||
|
include {
|
||||||
|
email_domain = ["@ahosking.com"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "cloudflare_access_application" "influx" {
|
resource "cloudflare_access_application" "influx" {
|
||||||
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
||||||
name = "influx"
|
name = "influx"
|
||||||
@ -22,6 +31,20 @@ resource "cloudflare_access_application" "money" {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_access_policy" "money" {
|
||||||
|
application_id = cloudflare_access_application.money.id
|
||||||
|
zone_id = cloudflare_zone.ahosking_com.id
|
||||||
|
name = "family"
|
||||||
|
precedence = "1"
|
||||||
|
decision = "allow"
|
||||||
|
include {
|
||||||
|
email_domain = ["@ahosking.com"]
|
||||||
|
}
|
||||||
|
require {
|
||||||
|
email_domain = ["@ahosking.com"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "cloudflare_access_application" "movies" {
|
resource "cloudflare_access_application" "movies" {
|
||||||
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
||||||
name = "movies"
|
name = "movies"
|
||||||
@ -42,4 +65,29 @@ resource "cloudflare_access_application" "tv" {
|
|||||||
allowed_idps = [
|
allowed_idps = [
|
||||||
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_access_application" "period" {
|
||||||
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
||||||
|
name = "period"
|
||||||
|
domain = "period.ahosking.com"
|
||||||
|
type = "self_hosted"
|
||||||
|
session_duration = "336h"
|
||||||
|
allowed_idps = [
|
||||||
|
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_access_policy" "period" {
|
||||||
|
application_id = cloudflare_access_application.period.id
|
||||||
|
zone_id = cloudflare_zone.ahosking_com.id
|
||||||
|
name = "family"
|
||||||
|
precedence = "1"
|
||||||
|
decision = "allow"
|
||||||
|
include {
|
||||||
|
email_domain = ["@ahosking.com"]
|
||||||
|
}
|
||||||
|
require {
|
||||||
|
email_domain = ["@ahosking.com"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -4,6 +4,14 @@ resource "cloudflare_zone" "automatedbytes_com" {
|
|||||||
zone = "automatedbytes.com"
|
zone = "automatedbytes.com"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "automatedbytes" {
|
||||||
|
zone_id = cloudflare_zone.automatedbytes_com.id
|
||||||
|
name = "automatedbytes.com"
|
||||||
|
type = "A"
|
||||||
|
ttl = "1"
|
||||||
|
value = var.home_ip
|
||||||
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "assets_automatedbytes" {
|
resource "cloudflare_record" "assets_automatedbytes" {
|
||||||
zone_id = cloudflare_zone.automatedbytes_com.id
|
zone_id = cloudflare_zone.automatedbytes_com.id
|
||||||
name = "assets"
|
name = "assets"
|
||||||
|
@ -37,5 +37,5 @@ variable "environment" {}
|
|||||||
|
|
||||||
variable "ahosking_com_cnames" {
|
variable "ahosking_com_cnames" {
|
||||||
default = ["code", "radarr", "sonarr", "ombi", "git",
|
default = ["code", "radarr", "sonarr", "ombi", "git",
|
||||||
"monitors", "tv", "movies", "money"]
|
"monitors", "tv", "movies", "money", "period"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user