File tree Expand file tree Collapse file tree
tf/deployment/modules/shared/cloudflare/account Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ resource "cloudflare_record" "immich_ca_aaaa_root" {
2+ name = " immich.ca"
3+ proxied = true
4+ ttl = 1
5+ type = " AAAA"
6+ content = " 100::"
7+ zone_id = cloudflare_zone. immich_ca . id
8+ }
9+
10+ resource "cloudflare_record" "immich_ca_aaaa_www" {
11+ name = " www"
12+ proxied = true
13+ ttl = 1
14+ type = " AAAA"
15+ content = " 100::"
16+ zone_id = cloudflare_zone. immich_ca . id
17+ }
Original file line number Diff line number Diff line change @@ -173,3 +173,27 @@ resource "cloudflare_ruleset" "immich_cc_redirects" {
173173 enabled = true
174174 }
175175}
176+
177+ resource "cloudflare_ruleset" "immich_ca_redirects" {
178+ zone_id = cloudflare_zone. immich_ca . id
179+ name = " immich.ca to immich.app redirects"
180+ description = " Redirects immich.ca to immich.app"
181+ kind = " zone"
182+ phase = " http_request_dynamic_redirect"
183+
184+ rules {
185+ action = " redirect"
186+ action_parameters {
187+ from_value {
188+ status_code = 307
189+ target_url {
190+ value = " https://immich.app"
191+ }
192+ preserve_query_string = true
193+ }
194+ }
195+ expression = " (http.host eq \" www.immich.ca\" ) or (http.host eq \" immich.ca\" )"
196+ description = " Redirect visitors going to immich.ca links"
197+ enabled = true
198+ }
199+ }
Original file line number Diff line number Diff line change @@ -157,6 +157,38 @@ output "immich_pro_zone_id" {
157157 value = cloudflare_zone. immich_pro . id
158158}
159159
160+ resource "cloudflare_zone" "immich_ca" {
161+ account_id = var. cloudflare_account_id
162+ zone = " immich.ca"
163+ }
164+
165+ resource "cloudflare_zone_settings_override" "immich_ca" {
166+ zone_id = cloudflare_zone. immich_ca . id
167+
168+ settings {
169+ http3 = " on"
170+ zero_rtt = " on"
171+ tls_1_3 = " zrt"
172+ always_use_https = " on"
173+ ssl = " strict"
174+ brotli = " on"
175+ fonts = " on"
176+ early_hints = " on"
177+ rocket_loader = " on"
178+ speed_brain = " on"
179+ }
180+ }
181+
182+ resource "cloudflare_tiered_cache" "immich_ca" {
183+ zone_id = cloudflare_zone. immich_ca . id
184+ cache_type = " smart"
185+ }
186+
187+
188+ output "immich_ca_zone_id" {
189+ value = cloudflare_zone. immich_ca . id
190+ }
191+
160192resource "cloudflare_zone" "immich_build" {
161193 account_id = var. cloudflare_account_id
162194 zone = " immich.build"
You can’t perform that action at this time.
0 commit comments