If you have any questions regarding this upgrade process, please consult the examples
directory:
If you find a bug, please open an issue with supporting configuration to reproduce.
var.redrive_policy
, andvar.redrive_allow_policy
data types have changed fromstring
toany
which is a map of values. The conversion from a map to a jsonencoded string is now handled by the modulevar.name_prefix
has been replaced withvar.use_name_prefix
which is a boolean that will usevar.name
as a prefixvar.policy
has been removed; users can create a policy via the queue policy or dead-letter queue policy which by default uses the associated queue ARN as theresource
(avoids the chicken vs the egg scenario)
- When creating a FIFO queue, the
.fifo
postfix will now be automatically added to the queue name - Added support for creating:
- Queue policy
- Dead letter queue
- Dead letter queue policy
- Redrive and redrive allow policies have been converted to their separate resources to avoid lifecycle conflicts; now you can create both the source queue and dead-letter queue in the same
terraform apply
without conflict - The queue data source previously used to extract the queue name has been replaced since this is natively supported in the current AWS provider queue resource
visibility_timeout_seconds
default value has been changed from30
tonull
message_retention_seconds
default value has been changed from345600
tonull
max_message_size
default value has been changed from262144
tonull
delay_seconds
default value has been changed from0
tonull
receive_wait_time_seconds
default value has been changed from0
tonull
content_based_deduplication
default value has been changed fromfalse
tonull
sqs_managed_sse_enabled
default value has been changed fromfalse
totrue
(matches current default behavior but value is needed for internal logic evaluation)kms_data_key_reuse_period_seconds
default value has been changed from300
tonull
-
Removed variables:
name_prefix
has been replaced withuse_name_prefix
which is a boolean that will usename
as a prefixpolicy
has been removed; users can create a policy via the queue policy or dead-letter queue policy which by default uses the associated queue ARN as theresource
(avoids the chicken vs the egg scenario)
-
Renamed variables:
- None
-
Added variables:
use_name_prefix
create_queue_policy
source_queue_policy_documents
override_queue_policy_documents
queue_policy_statements
create_dlq
dlq_content_based_deduplication
dlq_deduplication_scope
dlq_delay_seconds
dlq_kms_data_key_reuse_period_seconds
dlq_kms_master_key_id
dlq_message_retention_seconds
dlq_name
dlq_receive_wait_time_seconds
dlq_redrive_allow_policy
dlq_sqs_managed_sse_enabled
dlq_visibility_timeout_seconds
dlq_tags
create_dlq_queue_policy
source_dlq_queue_policy_documents
override_dlq_queue_policy_documents
dlq_queue_policy_statements
-
Removed outputs:
- None
-
Renamed outputs:
- All output names have had the
sqs_
prefix removed
- All output names have had the
-
Added outputs:
queue_url
dead_letter_queue_id
dead_letter_queue_arn
dead_letter_queue_url
dead_letter_queue_name
Note: Only the affected attributes are shown below for brevity.
module "sqs" {
source = "terraform-aws-modules/sqs/aws"
version = "~> 3.0"
name_prefix = "example-"
redrive_policy = jsonencoded({
redrivePermission = "byQueue",
sourceQueueArns = [aws_sqs_queue.example.arn]
})
redrive_allow_policy = jsonencoded({
deadLetterTargetArn = aws_sqs_queue.example.arn
maxReceiveCount = 4
})
policy = "..."
}
module "sqs" {
source = "terraform-aws-modules/sns/aws"
version = "~> 4.0"
name = "example"
use_name_prefix = true
redrive_policy = {
redrivePermission = "byQueue",
sourceQueueArns = [aws_sqs_queue.example.arn]
}
redrive_allow_policy = {
deadLetterTargetArn = aws_sqs_queue.example.arn
maxReceiveCount = 4
}
# Can be used to utilize v3.x `var.policy` value without modification
# source_queue_policy_documents = ["..."]
}
No state changes required.