Skip to content

Commit

Permalink
remove member-unrestricted count
Browse files Browse the repository at this point in the history
  • Loading branch information
richgreen-moj committed Oct 22, 2024
1 parent e25a823 commit 4257b00
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions modules/securityhub/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,10 @@ data "aws_iam_policy_document" "sns_kms" {

# Setup PagerDuty Alerting in all enabled regions
module "pagerduty_alerts_securityhub" {
count = (local.account_data.account-type != "member-unrestricted") ? 1 : 0
depends_on = [
aws_sns_topic.sechub_findings_sns_topic
]
source = "github.com/ministryofjustice/modernisation-platform-terraform-pagerduty-integration?ref=0179859e6fafc567843cd55c0b05d325d5012dc4" # v2.0.0
sns_topics = [aws_sns_topic.sechub_findings_sns_topic.name]
pagerduty_integration_key = var.pagerduty_integration_key
}

locals {
account_name = try(regex("^bichard*.|^remote-supervisio*.", terraform.workspace), replace(terraform.workspace, regex("-[^-]*$", terraform.workspace), ""))
account_data = jsondecode(file("../../../../environments/${local.account_name}.json"))
}

0 comments on commit 4257b00

Please sign in to comment.