diff --git a/main.tf b/main.tf index bcbef8b3..40971cb0 100644 --- a/main.tf +++ b/main.tf @@ -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" { diff --git a/variables.tf b/variables.tf index 6823af6e..8fe38a66 100644 --- a/variables.tf +++ b/variables.tf @@ -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 = [] @@ -1202,5 +1229,3 @@ variable "node_role_name_override" { default = null description = "Name override for node role" } - -