mirror of
https://github.com/immich-app/devtools.git
synced 2026-09-30 13:23:00 +08:00
10 lines
527 B
Terraform
10 lines
527 B
Terraform
locals {
|
|
// Cloudflare pages requires a branch name
|
|
// This determines whether the deployment is production or staging
|
|
// In our case we deploy to the "prod" production branch only for production environment with no stage
|
|
// This automatically resolves if we combine stage and env
|
|
unsanitised_pages_branch = "${var.stage}${var.env}"
|
|
pages_branch = replace(local.unsanitised_pages_branch, "/[^a-zA-Z\\d]/", "-")
|
|
pages_url_prefix = local.pages_branch == "prod" ? "" : "${local.pages_branch}."
|
|
}
|