From 61f6b1adcfd2e8c99b9e67d4dd455814b1d7ca5e Mon Sep 17 00:00:00 2001 From: Dan Snow Date: Sun, 15 Dec 2024 03:43:31 -0600 Subject: [PATCH] Snapshot infra changes --- terraform/cloudflare-pages.tf | 4 +++- terraform/cloudflare-rulesets.tf | 3 ++- terraform/variables.tf | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/terraform/cloudflare-pages.tf b/terraform/cloudflare-pages.tf index c5ed3cb..97f98ea 100644 --- a/terraform/cloudflare-pages.tf +++ b/terraform/cloudflare-pages.tf @@ -12,7 +12,7 @@ resource "cloudflare_pages_project" "opentimes-org" { pr_comments_enabled = true deployments_enabled = true production_deployment_enabled = true - preview_deployment_setting = "custom" + preview_deployment_setting = "all" preview_branch_includes = ["dev", "preview"] preview_branch_excludes = ["main"] } @@ -28,11 +28,13 @@ resource "cloudflare_pages_project" "opentimes-org" { preview { environment_variables = { ENVIRONMENT = "preview" + HUGO_VERSION = var.hugo_version } } production { environment_variables = { ENVIRONMENT = "production" + HUGO_VERSION = var.hugo_version } } } diff --git a/terraform/cloudflare-rulesets.tf b/terraform/cloudflare-rulesets.tf index a99b2c0..80d48ad 100644 --- a/terraform/cloudflare-rulesets.tf +++ b/terraform/cloudflare-rulesets.tf @@ -13,7 +13,8 @@ resource "cloudflare_ruleset" "cache_data_subdomain" { default = 1209600 } browser_ttl { - mode = "bypass" + mode = "override_origin" + default = 7200 } serve_stale { disable_stale_while_updating = true diff --git a/terraform/variables.tf b/terraform/variables.tf index 7617567..5275c31 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -6,3 +6,8 @@ variable "cloudflare_account_id" { variable "cloudflare_api_token" { type = string } + +variable "hugo_version" { + type = string + default = "0.139.2" +}