Skip to content

Commit

Permalink
Merge pull request #30 from companieshouse/add-xmatters
Browse files Browse the repository at this point in the history
added xmatters
  • Loading branch information
charris-CH authored Apr 16, 2024
2 parents 0dd6eca + 17c3d17 commit 6a3093c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions groups/unix-hdev-01/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,7 @@ data "aws_security_group" "unix_development_01_sg" {
data "vault_generic_secret" "chs_subnet" {
path = "aws-accounts/network/${var.aws_account}/chs/application-subnets"
}

data "vault_generic_secret" "sns_url" {
path = "applications/${var.aws_account}-${var.aws_region}/monitoring"
}
26 changes: 26 additions & 0 deletions groups/unix-hdev-01/sns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,30 @@ module "cloudwatch_sns_notifications_ooh" {
"ServiceTeam", "UNIX"
)
)
}


resource "aws_sns_topic" "unix-dev-01_topic" {
name = "unix-dev-01_topic"
}

resource "aws_sns_topic_subscription" "unix-dev-01_Subscription" {
topic_arn = aws_sns_topic.unix-dev-01_topic.arn
for_each = toset(["linuxsupport@companieshouse.gov.uk"])
protocol = "email"
endpoint = each.value

depends_on = [
aws_sns_topic.unix-dev-01_topic
]
}

resource "aws_sns_topic_subscription" "unix-dev-01_Subscriptionhttps" {
topic_arn = aws_sns_topic.unix-dev-01_topic.arn
protocol = "https"
endpoint = data.vault_generic_secret.sns_url.data["url"]

depends_on = [
aws_sns_topic.unix-dev-01_topic
]
}

0 comments on commit 6a3093c

Please sign in to comment.