Skip to content

Commit

Permalink
[DOP-2328] (#364)
Browse files Browse the repository at this point in the history
* Update sqs_sns module version and add variables

* Rollback removed outputs

* Add default value for sqs_sns variables
  • Loading branch information
ltellesfl authored Nov 27, 2024
1 parent b08166b commit 233d587
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
16 changes: 10 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,16 @@ module "networking" {
}

module "sqs_sns" {
count = var.sqs_sns == true ? 1 : 0
source = "app.terraform.io/indico/indico-aws-sqs-sns/mod"
version = "1.2.0"
region = var.region
label = var.label
kms_master_key_id = module.kms_key.key.id
count = var.sqs_sns == true ? 1 : 0
source = "app.terraform.io/indico/indico-aws-sqs-sns/mod"
version = "2.0.0"
region = var.region
label = var.label
kms_master_key_id = module.kms_key.key.id
sqs_sns_type = var.sqs_sns_type
ipa_sns_topic_name = var.ipa_sns_topic_name
ipa_sqs_queue_name = var.ipa_sqs_queue_name
indico_sqs_sns_policy_name = var.indico_sqs_sns_policy_name
}

module "lambda-sns-forwarder" {
Expand Down
29 changes: 27 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,33 @@ variable "instance_volume_type" {
description = "The type of EBS volume to attach to the cluster nodes"
}

variable "sqs_sns_type" {
type = string
default = "create"
validation {
condition = var.sqs_sns_type == "create" || var.sqs_sns_type == "load"
error_message = "${var.sqs_sns_type} not valid. Type must be either create or load"
}
}

variable "ipa_sns_topic_name" {
type = string
description = "Full name of the SNS topic"
default = null
}

variable "ipa_sqs_queue_name" {
type = string
description = "Full name of the SQS queue"
default = null
}

variable "indico_sqs_sns_policy_name" {
type = string
description = "Full name of the SQS SNS policy"
default = null
}

variable "additional_users" {
type = list(string)
default = []
Expand Down Expand Up @@ -1202,5 +1229,3 @@ variable "node_role_name_override" {
default = null
description = "Name override for node role"
}


0 comments on commit 233d587

Please sign in to comment.