Skip to content

Commit

Permalink
Snapshot infra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsnow committed Dec 15, 2024
1 parent f6d77d5 commit 793cf6b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion terraform/cloudflare-pages.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Expand All @@ -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
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion terraform/cloudflare-rulesets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ variable "cloudflare_account_id" {
variable "cloudflare_api_token" {
type = string
}

variable "hugo_version" {
type = string
default = "0.139.2"
}

0 comments on commit 793cf6b

Please sign in to comment.