-
Notifications
You must be signed in to change notification settings - Fork 8
/
sns.tf
30 lines (28 loc) · 868 Bytes
/
sns.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Creating SNS Topic
resource "aws_sns_topic" "filesavailable" {
name = "${local.name_prefix}_filesavailable"
}
## Creating Error SNS Topic
resource "aws_sns_topic" "error_topic" {
name = "${local.name_prefix}_errors"
provisioner "local-exec" {
command = "sh scripts/sns_subscription.sh"
environment = {
sns_arn = self.arn
sns_emails = var.technology_subscription_email_address_list
region = var.aws_region
}
}
}
## Creating Business User SNS Topic to notify when latest data is available.
resource "aws_sns_topic" "business_user_topic" {
name = "${local.name_prefix}_business_user_success"
provisioner "local-exec" {
command = "sh scripts/sns_subscription.sh"
environment = {
sns_arn = self.arn
sns_emails = var.business_subscription_email_address_list
region = var.aws_region
}
}
}