diff --git a/README.md b/README.md
index 2616e3b..fbbf6a2 100644
--- a/README.md
+++ b/README.md
@@ -135,13 +135,13 @@ module "sns_topic" {
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0 |
-| [aws](#requirement\_aws) | >= 4.40 |
+| [aws](#requirement\_aws) | >= 4.56 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 4.40 |
+| [aws](#provider\_aws) | >= 4.56 |
## Modules
@@ -176,6 +176,7 @@ No modules.
| [lambda\_feedback](#input\_lambda\_feedback) | Map of IAM role ARNs and sample rate for success and failure feedback | `map(string)` | `{}` | no |
| [name](#input\_name) | The name of the SNS topic to create | `string` | `null` | no |
| [override\_topic\_policy\_documents](#input\_override\_topic\_policy\_documents) | List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` | `list(string)` | `[]` | no |
+| [signature\_version](#input\_signature\_version) | If SignatureVersion should be 1 (SHA1) or 2 (SHA256). The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. | `number` | `null` | no |
| [source\_topic\_policy\_documents](#input\_source\_topic\_policy\_documents) | List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s | `list(string)` | `[]` | no |
| [sqs\_feedback](#input\_sqs\_feedback) | Map of IAM role ARNs and sample rate for success and failure feedback | `map(string)` | `{}` | no |
| [subscriptions](#input\_subscriptions) | A map of subscription definitions to create | `any` | `{}` | no |
diff --git a/examples/complete/main.tf b/examples/complete/main.tf
index 372114d..1bf6670 100644
--- a/examples/complete/main.tf
+++ b/examples/complete/main.tf
@@ -22,7 +22,8 @@ locals {
module "default_sns" {
source = "../../"
- name = "${local.name}-default"
+ name = "${local.name}-default"
+ signature_version = 2
tags = local.tags
}
diff --git a/main.tf b/main.tf
index 8d81b28..b86d974 100644
--- a/main.tf
+++ b/main.tf
@@ -18,6 +18,7 @@ resource "aws_sns_topic" "this" {
delivery_policy = var.delivery_policy
display_name = var.display_name
fifo_topic = var.fifo_topic
+ signature_version = var.fifo_topic ? null : var.signature_version
firehose_failure_feedback_role_arn = try(var.firehose_feedback.failure_role_arn, null)
firehose_success_feedback_role_arn = try(var.firehose_feedback.success_role_arn, null)
diff --git a/variables.tf b/variables.tf
index 97306c0..9ad2955 100644
--- a/variables.tf
+++ b/variables.tf
@@ -122,6 +122,12 @@ variable "sqs_feedback" {
# }
}
+variable "signature_version" {
+ description = "If SignatureVersion should be 1 (SHA1) or 2 (SHA256). The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS."
+ type = number
+ default = null
+}
+
################################################################################
# Topic Policy
################################################################################
diff --git a/versions.tf b/versions.tf
index fa875db..f6b386d 100644
--- a/versions.tf
+++ b/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 4.40"
+ version = ">= 4.56"
}
}
}
diff --git a/wrappers/main.tf b/wrappers/main.tf
index da5d84a..24da9b7 100644
--- a/wrappers/main.tf
+++ b/wrappers/main.tf
@@ -18,6 +18,7 @@ module "wrapper" {
lambda_feedback = try(each.value.lambda_feedback, var.defaults.lambda_feedback, {})
topic_policy = try(each.value.topic_policy, var.defaults.topic_policy, null)
sqs_feedback = try(each.value.sqs_feedback, var.defaults.sqs_feedback, {})
+ signature_version = try(each.value.signature_version, var.defaults.signature_version, null)
create_topic_policy = try(each.value.create_topic_policy, var.defaults.create_topic_policy, true)
source_topic_policy_documents = try(each.value.source_topic_policy_documents, var.defaults.source_topic_policy_documents, [])
override_topic_policy_documents = try(each.value.override_topic_policy_documents, var.defaults.override_topic_policy_documents, [])