Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
Fix non-pr env logic
Browse files Browse the repository at this point in the history
Co-Authored-By: James Gilmore <[email protected]>
Co-Authored-By: halprin <[email protected]>
  • Loading branch information
3 people committed Oct 22, 2024
1 parent 2e08cd8 commit 7a13e2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion operations/template/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ locals {
rs_domain_prefix = "${local.selected_rs_environment_prefix}${length(local.selected_rs_environment_prefix) == 0 ? "" : "."}"
higher_environment_level = var.environment == "stg" || var.environment == "prd"
cdc_domain_environment = var.environment == "dev" || var.environment == "stg" || var.environment == "prd"
non_pr_environment = !strcontains(var.environment, "pr")
// If the environment looks like pr123, regex will return matches. If there are no matches, it's a non-pr env
non_pr_environment = regex("pr\\d+", var.environment) != []
}

data "azurerm_resource_group" "group" {
Expand Down

0 comments on commit 7a13e2a

Please sign in to comment.