Skip to content

Commit

Permalink
Merge pull request #16 from clouddrove/PROX-100
Browse files Browse the repository at this point in the history
add new enable_subscription variable
  • Loading branch information
Nikita Dugar authored Jul 27, 2021
2 parents 329a2c6 + 1e6eada commit 875a4a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "aws_sns_topic" "default" {
#Module : SNS TOPIC SUBSCRIPTION
#Description : Terraform module which creates SNS Topic Subscription resources on AWS
resource "aws_sns_topic_subscription" "default" {
count = var.enabled && var.enable_topic ? 1 : 0
count = var.enabled && var.enable_subscription ? 1 : 0

topic_arn = aws_sns_topic.default[count.index].arn
protocol = var.protocol
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ variable "subscription_delivery_policy" {

variable "enable_sms_preference" {
type = bool
default = true
default = false
description = "Boolean indicating whether or not to update SNS SMS Preference."
}

Expand All @@ -292,6 +292,12 @@ variable "enable_topic" {
description = "Boolean indicating whether or not to create topic."
}

variable "enable_subscription" {
type = bool
default = false
description = "Boolean indicating whether or not to create subscription."
}

variable "enable_sns" {
type = bool
default = false
Expand Down

0 comments on commit 875a4a5

Please sign in to comment.