Skip to content

Commit

Permalink
Fix root domain expression
Browse files Browse the repository at this point in the history
  • Loading branch information
carlssonk committed Oct 10, 2024
1 parent 5e88bdd commit 33646f2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/cloudflare/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ locals {
app.subdomain,
app.root_domain,
join(" or ", [for env in var.environments :
env == "prod" ?
format("http.host eq \"%s.%s\"", app.subdomain, app.root_domain) :
format("http.host eq \"%s-%s.%s\"", app.subdomain, env, app.root_domain)
]),
format("http.host eq \"%s.%s\"", env, app.root_domain)
if env != "prod"
])
)
) : join(" or ", [for env in var.environments :
env == "prod" ?
Expand Down

0 comments on commit 33646f2

Please sign in to comment.