Skip to content

Commit 4b682a8

Browse files
authored
Add notifications (#13)
* Adde notifications * Added support of different notificaton targets
1 parent 60d56ad commit 4b682a8

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

main.tf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,35 @@ resource "aws_elastic_beanstalk_environment" "default" {
886886
name = "Protocol"
887887
value = "HTTP"
888888
}
889+
###===================== Notification =====================================================###
890+
891+
setting {
892+
namespace = "aws:elasticbeanstalk:sns:topics"
893+
name = "Notification Endpoint"
894+
value = "${var.notification_endpoint}"
895+
}
896+
897+
setting {
898+
namespace = "aws:elasticbeanstalk:sns:topics"
899+
name = "Notification Protocol"
900+
value = "${var.notification_protocol}"
901+
}
902+
903+
setting {
904+
namespace = "aws:elasticbeanstalk:sns:topics"
905+
name = "Notification Topic ARN"
906+
value = "${var.notification_topic_arn}"
907+
}
908+
909+
setting {
910+
namespace = "aws:elasticbeanstalk:sns:topics"
911+
name = "Notification Topic Name"
912+
value = "${var.notification_topic_name}"
913+
}
914+
915+
916+
917+
889918
depends_on = ["aws_security_group.default"]
890919
}
891920

variables.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ variable "healthcheck_url" {
1414
default = "/healthcheck"
1515
}
1616

17+
variable "notification_protocol" {
18+
default = "email"
19+
}
20+
21+
variable "notification_endpoint" {
22+
default = ""
23+
}
24+
25+
variable "notification_topic_arn" {
26+
default = ""
27+
}
28+
29+
variable "notification_topic_name" {
30+
default = ""
31+
}
32+
1733
variable "loadbalancer_type" {
1834
default = "classic"
1935
}

0 commit comments

Comments
 (0)