You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have any questions regarding this upgrade process, please consult the [`examples`](https://github.com/terraform-aws-modules/terraform-aws-sns/tree/master/examples/complete) directory:
4
+
5
+
If you find a bug, please open an issue with supporting configuration to reproduce.
6
+
7
+
## List of backwards incompatible changes
8
+
9
+
-`var.redrive_policy`, and `var.redrive_allow_policy` data types have changed from `string` to `any` which is a map of values. The conversion from a map to a jsonencoded string is now handled by the module
10
+
-`var.name_prefix` has been replaced with `var.use_name_prefix` which is a boolean that will use `var.name` as a prefix
11
+
-`var.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 the `resource` (avoids the chicken vs the egg scenario)
12
+
13
+
## Additional changes
14
+
15
+
### Added
16
+
17
+
- When creating a FIFO queue, the `.fifo` postfix will now be automatically added to the queue name
18
+
- Added support for creating:
19
+
- Queue policy
20
+
- Dead letter queue
21
+
- Dead letter queue policy
22
+
- 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
23
+
- 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
24
+
25
+
### Modified
26
+
27
+
-`visibility_timeout_seconds` default value has been changed from `30` to `null`
28
+
-`message_retention_seconds` default value has been changed from `345600` to `null`
29
+
-`max_message_size` default value has been changed from `262144` to `null`
30
+
-`delay_seconds` default value has been changed from `0` to `null`
31
+
-`receive_wait_time_seconds` default value has been changed from `0` to `null`
32
+
-`content_based_deduplication` default value has been changed from `false` to `null`
33
+
-`sqs_managed_sse_enabled` default value has been changed from `false` to `true` (matches current default behavior but value is needed for internal logic evaluation)
34
+
-`kms_data_key_reuse_period_seconds` default value has been changed from `300` to `null`
35
+
36
+
### Variable and output changes
37
+
38
+
1. Removed variables:
39
+
40
+
-`name_prefix` has been replaced with `use_name_prefix` which is a boolean that will use `name` as a prefix
41
+
-`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 the `resource` (avoids the chicken vs the egg scenario)
42
+
43
+
2. Renamed variables:
44
+
45
+
- None
46
+
47
+
3. Added variables:
48
+
49
+
-`use_name_prefix`
50
+
-`create_queue_policy`
51
+
-`source_queue_policy_documents`
52
+
-`override_queue_policy_documents`
53
+
-`queue_policy_statements`
54
+
-`create_dlq`
55
+
-`dlq_content_based_deduplication`
56
+
-`dlq_deduplication_scope`
57
+
-`dlq_delay_seconds`
58
+
-`dlq_kms_data_key_reuse_period_seconds`
59
+
-`dlq_kms_master_key_id`
60
+
-`dlq_message_retention_seconds`
61
+
-`dlq_name`
62
+
-`dlq_receive_wait_time_seconds`
63
+
-`dlq_redrive_allow_policy`
64
+
-`dlq_sqs_managed_sse_enabled`
65
+
-`dlq_visibility_timeout_seconds`
66
+
-`dlq_tags`
67
+
-`create_dlq_queue_policy`
68
+
-`source_dlq_queue_policy_documents`
69
+
-`override_dlq_queue_policy_documents`
70
+
-`dlq_queue_policy_statements`
71
+
72
+
4. Removed outputs:
73
+
74
+
- None
75
+
76
+
5. Renamed outputs:
77
+
78
+
- All output names have had the `sqs_` prefix removed
79
+
80
+
6. Added outputs:
81
+
82
+
-`queue_url`
83
+
-`dead_letter_queue_id`
84
+
-`dead_letter_queue_arn`
85
+
-`dead_letter_queue_url`
86
+
-`dead_letter_queue_name`
87
+
88
+
## Upgrade Migrations
89
+
90
+
Note: Only the affected attributes are shown below for brevity.
91
+
92
+
### Before 3.x Example
93
+
94
+
```hcl
95
+
module "sqs" {
96
+
source = "terraform-aws-modules/sqs/aws"
97
+
version = "~> 3.0"
98
+
99
+
name_prefix = "example-"
100
+
101
+
redrive_policy = jsonencoded({
102
+
redrivePermission = "byQueue",
103
+
sourceQueueArns = [aws_sqs_queue.example.arn]
104
+
})
105
+
redrive_allow_policy = jsonencoded({
106
+
deadLetterTargetArn = aws_sqs_queue.example.arn
107
+
maxReceiveCount = 4
108
+
})
109
+
110
+
policy = "..."
111
+
}
112
+
```
113
+
114
+
### After 4.x Example
115
+
116
+
```hcl
117
+
module "sqs" {
118
+
source = "terraform-aws-modules/sns/aws"
119
+
version = "~> 4.0"
120
+
121
+
name = "example"
122
+
use_name_prefix = true
123
+
124
+
redrive_policy = {
125
+
redrivePermission = "byQueue",
126
+
sourceQueueArns = [aws_sqs_queue.example.arn]
127
+
}
128
+
redrive_allow_policy = {
129
+
deadLetterTargetArn = aws_sqs_queue.example.arn
130
+
maxReceiveCount = 4
131
+
}
132
+
133
+
# Can be used to utilize v3.x `var.policy` value without modification
Please note - the examples provided serve two primary means:
4
+
5
+
1. Show users working examples of the various ways in which the module can be configured and features supported
6
+
2. A means of testing/validating module changes
7
+
8
+
Please do not mistake the examples provided as "best practices". It is up to users to consult the AWS service documentation for best practices, usage recommendations, etc.
|[aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)| data source |
47
58
48
59
## Inputs
@@ -53,8 +64,68 @@ No inputs.
53
64
54
65
| Name | Description |
55
66
|------|-------------|
56
-
| <aname="output_users_encrypted_sqs_queue_arn"></a> [users\_encrypted\_sqs\_queue\_arn](#output\_users\_encrypted\_sqs\_queue\_arn)| The ARN of the SQS queue |
57
-
| <aname="output_users_encrypted_sqs_queue_id"></a> [users\_encrypted\_sqs\_queue\_id](#output\_users\_encrypted\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
58
-
| <aname="output_users_unencrypted_sqs_queue_arn"></a> [users\_unencrypted\_sqs\_queue\_arn](#output\_users\_unencrypted\_sqs\_queue\_arn)| The ARN of the SQS queue |
59
-
| <aname="output_users_unencrypted_sqs_queue_id"></a> [users\_unencrypted\_sqs\_queue\_id](#output\_users\_unencrypted\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
67
+
| <aname="output_cmk_encrypted_sqs_dlq_arn"></a> [cmk\_encrypted\_sqs\_dlq\_arn](#output\_cmk\_encrypted\_sqs\_dlq\_arn)| The ARN of the SQS queue |
68
+
| <aname="output_cmk_encrypted_sqs_dlq_id"></a> [cmk\_encrypted\_sqs\_dlq\_id](#output\_cmk\_encrypted\_sqs\_dlq\_id)| The URL for the created Amazon SQS queue |
69
+
| <aname="output_cmk_encrypted_sqs_dlq_name"></a> [cmk\_encrypted\_sqs\_dlq\_name](#output\_cmk\_encrypted\_sqs\_dlq\_name)| The name of the SQS queue |
70
+
| <aname="output_cmk_encrypted_sqs_dlq_url"></a> [cmk\_encrypted\_sqs\_dlq\_url](#output\_cmk\_encrypted\_sqs\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
71
+
| <aname="output_cmk_encrypted_sqs_queue_arn"></a> [cmk\_encrypted\_sqs\_queue\_arn](#output\_cmk\_encrypted\_sqs\_queue\_arn)| The ARN of the SQS queue |
72
+
| <aname="output_cmk_encrypted_sqs_queue_id"></a> [cmk\_encrypted\_sqs\_queue\_id](#output\_cmk\_encrypted\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
73
+
| <aname="output_cmk_encrypted_sqs_queue_name"></a> [cmk\_encrypted\_sqs\_queue\_name](#output\_cmk\_encrypted\_sqs\_queue\_name)| The name of the SQS queue |
74
+
| <aname="output_cmk_encrypted_sqs_queue_url"></a> [cmk\_encrypted\_sqs\_queue\_url](#output\_cmk\_encrypted\_sqs\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
75
+
| <aname="output_default_sqs_dlq_arn"></a> [default\_sqs\_dlq\_arn](#output\_default\_sqs\_dlq\_arn)| The ARN of the SQS queue |
76
+
| <aname="output_default_sqs_dlq_id"></a> [default\_sqs\_dlq\_id](#output\_default\_sqs\_dlq\_id)| The URL for the created Amazon SQS queue |
77
+
| <aname="output_default_sqs_dlq_name"></a> [default\_sqs\_dlq\_name](#output\_default\_sqs\_dlq\_name)| The name of the SQS queue |
78
+
| <aname="output_default_sqs_dlq_url"></a> [default\_sqs\_dlq\_url](#output\_default\_sqs\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
79
+
| <aname="output_default_sqs_queue_arn"></a> [default\_sqs\_queue\_arn](#output\_default\_sqs\_queue\_arn)| The ARN of the SQS queue |
80
+
| <aname="output_default_sqs_queue_id"></a> [default\_sqs\_queue\_id](#output\_default\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
81
+
| <aname="output_default_sqs_queue_name"></a> [default\_sqs\_queue\_name](#output\_default\_sqs\_queue\_name)| The name of the SQS queue |
82
+
| <aname="output_default_sqs_queue_url"></a> [default\_sqs\_queue\_url](#output\_default\_sqs\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
83
+
| <aname="output_disabled_sqs_dlq_arn"></a> [disabled\_sqs\_dlq\_arn](#output\_disabled\_sqs\_dlq\_arn)| The ARN of the SQS queue |
84
+
| <aname="output_disabled_sqs_dlq_id"></a> [disabled\_sqs\_dlq\_id](#output\_disabled\_sqs\_dlq\_id)| The URL for the created Amazon SQS queue |
85
+
| <aname="output_disabled_sqs_dlq_name"></a> [disabled\_sqs\_dlq\_name](#output\_disabled\_sqs\_dlq\_name)| The name of the SQS queue |
86
+
| <aname="output_disabled_sqs_dlq_url"></a> [disabled\_sqs\_dlq\_url](#output\_disabled\_sqs\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
87
+
| <aname="output_disabled_sqs_queue_arn"></a> [disabled\_sqs\_queue\_arn](#output\_disabled\_sqs\_queue\_arn)| The ARN of the SQS queue |
88
+
| <aname="output_disabled_sqs_queue_id"></a> [disabled\_sqs\_queue\_id](#output\_disabled\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
89
+
| <aname="output_disabled_sqs_queue_name"></a> [disabled\_sqs\_queue\_name](#output\_disabled\_sqs\_queue\_name)| The name of the SQS queue |
90
+
| <aname="output_disabled_sqs_queue_url"></a> [disabled\_sqs\_queue\_url](#output\_disabled\_sqs\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
91
+
| <aname="output_fifo_sqs_dlq_arn"></a> [fifo\_sqs\_dlq\_arn](#output\_fifo\_sqs\_dlq\_arn)| The ARN of the SQS queue |
92
+
| <aname="output_fifo_sqs_dlq_id"></a> [fifo\_sqs\_dlq\_id](#output\_fifo\_sqs\_dlq\_id)| The URL for the created Amazon SQS queue |
93
+
| <aname="output_fifo_sqs_dlq_name"></a> [fifo\_sqs\_dlq\_name](#output\_fifo\_sqs\_dlq\_name)| The name of the SQS queue |
94
+
| <aname="output_fifo_sqs_dlq_url"></a> [fifo\_sqs\_dlq\_url](#output\_fifo\_sqs\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
95
+
| <aname="output_fifo_sqs_queue_arn"></a> [fifo\_sqs\_queue\_arn](#output\_fifo\_sqs\_queue\_arn)| The ARN of the SQS queue |
96
+
| <aname="output_fifo_sqs_queue_id"></a> [fifo\_sqs\_queue\_id](#output\_fifo\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
97
+
| <aname="output_fifo_sqs_queue_name"></a> [fifo\_sqs\_queue\_name](#output\_fifo\_sqs\_queue\_name)| The name of the SQS queue |
98
+
| <aname="output_fifo_sqs_queue_url"></a> [fifo\_sqs\_queue\_url](#output\_fifo\_sqs\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
99
+
| <aname="output_sqs_with_dlq_dlq_arn"></a> [sqs\_with\_dlq\_dlq\_arn](#output\_sqs\_with\_dlq\_dlq\_arn)| The ARN of the SQS queue |
100
+
| <aname="output_sqs_with_dlq_dlq_id"></a> [sqs\_with\_dlq\_dlq\_id](#output\_sqs\_with\_dlq\_dlq\_id)| The URL for the created Amazon SQS queue |
101
+
| <aname="output_sqs_with_dlq_dlq_name"></a> [sqs\_with\_dlq\_dlq\_name](#output\_sqs\_with\_dlq\_dlq\_name)| The name of the SQS queue |
102
+
| <aname="output_sqs_with_dlq_dlq_url"></a> [sqs\_with\_dlq\_dlq\_url](#output\_sqs\_with\_dlq\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
103
+
| <aname="output_sqs_with_dlq_queue_arn"></a> [sqs\_with\_dlq\_queue\_arn](#output\_sqs\_with\_dlq\_queue\_arn)| The ARN of the SQS queue |
104
+
| <aname="output_sqs_with_dlq_queue_id"></a> [sqs\_with\_dlq\_queue\_id](#output\_sqs\_with\_dlq\_queue\_id)| The URL for the created Amazon SQS queue |
105
+
| <aname="output_sqs_with_dlq_queue_name"></a> [sqs\_with\_dlq\_queue\_name](#output\_sqs\_with\_dlq\_queue\_name)| The name of the SQS queue |
106
+
| <aname="output_sqs_with_dlq_queue_url"></a> [sqs\_with\_dlq\_queue\_url](#output\_sqs\_with\_dlq\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
107
+
| <aname="output_sse_encrypted_dlq_sqs_dlq_arn"></a> [sse\_encrypted\_dlq\_sqs\_dlq\_arn](#output\_sse\_encrypted\_dlq\_sqs\_dlq\_arn)| The ARN of the SQS queue |
108
+
| <aname="output_sse_encrypted_dlq_sqs_dlq_id"></a> [sse\_encrypted\_dlq\_sqs\_dlq\_id](#output\_sse\_encrypted\_dlq\_sqs\_dlq\_id)| The URL for the created Amazon SQS queue |
109
+
| <aname="output_sse_encrypted_dlq_sqs_dlq_name"></a> [sse\_encrypted\_dlq\_sqs\_dlq\_name](#output\_sse\_encrypted\_dlq\_sqs\_dlq\_name)| The name of the SQS queue |
110
+
| <aname="output_sse_encrypted_dlq_sqs_dlq_url"></a> [sse\_encrypted\_dlq\_sqs\_dlq\_url](#output\_sse\_encrypted\_dlq\_sqs\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
111
+
| <aname="output_sse_encrypted_dlq_sqs_queue_arn"></a> [sse\_encrypted\_dlq\_sqs\_queue\_arn](#output\_sse\_encrypted\_dlq\_sqs\_queue\_arn)| The ARN of the SQS queue |
112
+
| <aname="output_sse_encrypted_dlq_sqs_queue_id"></a> [sse\_encrypted\_dlq\_sqs\_queue\_id](#output\_sse\_encrypted\_dlq\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
113
+
| <aname="output_sse_encrypted_dlq_sqs_queue_name"></a> [sse\_encrypted\_dlq\_sqs\_queue\_name](#output\_sse\_encrypted\_dlq\_sqs\_queue\_name)| The name of the SQS queue |
114
+
| <aname="output_sse_encrypted_dlq_sqs_queue_url"></a> [sse\_encrypted\_dlq\_sqs\_queue\_url](#output\_sse\_encrypted\_dlq\_sqs\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
115
+
| <aname="output_sse_encrypted_sqs_dlq_arn"></a> [sse\_encrypted\_sqs\_dlq\_arn](#output\_sse\_encrypted\_sqs\_dlq\_arn)| The ARN of the SQS queue |
116
+
| <aname="output_sse_encrypted_sqs_dlq_id"></a> [sse\_encrypted\_sqs\_dlq\_id](#output\_sse\_encrypted\_sqs\_dlq\_id)| The URL for the created Amazon SQS queue |
117
+
| <aname="output_sse_encrypted_sqs_dlq_name"></a> [sse\_encrypted\_sqs\_dlq\_name](#output\_sse\_encrypted\_sqs\_dlq\_name)| The name of the SQS queue |
118
+
| <aname="output_sse_encrypted_sqs_dlq_url"></a> [sse\_encrypted\_sqs\_dlq\_url](#output\_sse\_encrypted\_sqs\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
119
+
| <aname="output_sse_encrypted_sqs_queue_arn"></a> [sse\_encrypted\_sqs\_queue\_arn](#output\_sse\_encrypted\_sqs\_queue\_arn)| The ARN of the SQS queue |
120
+
| <aname="output_sse_encrypted_sqs_queue_id"></a> [sse\_encrypted\_sqs\_queue\_id](#output\_sse\_encrypted\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
121
+
| <aname="output_sse_encrypted_sqs_queue_name"></a> [sse\_encrypted\_sqs\_queue\_name](#output\_sse\_encrypted\_sqs\_queue\_name)| The name of the SQS queue |
122
+
| <aname="output_sse_encrypted_sqs_queue_url"></a> [sse\_encrypted\_sqs\_queue\_url](#output\_sse\_encrypted\_sqs\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
123
+
| <aname="output_unencrypted_sqs_dlq_arn"></a> [unencrypted\_sqs\_dlq\_arn](#output\_unencrypted\_sqs\_dlq\_arn)| The ARN of the SQS queue |
124
+
| <aname="output_unencrypted_sqs_dlq_id"></a> [unencrypted\_sqs\_dlq\_id](#output\_unencrypted\_sqs\_dlq\_id)| The URL for the created Amazon SQS queue |
125
+
| <aname="output_unencrypted_sqs_dlq_name"></a> [unencrypted\_sqs\_dlq\_name](#output\_unencrypted\_sqs\_dlq\_name)| The name of the SQS queue |
126
+
| <aname="output_unencrypted_sqs_dlq_url"></a> [unencrypted\_sqs\_dlq\_url](#output\_unencrypted\_sqs\_dlq\_url)| Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue |
127
+
| <aname="output_unencrypted_sqs_queue_arn"></a> [unencrypted\_sqs\_queue\_arn](#output\_unencrypted\_sqs\_queue\_arn)| The ARN of the SQS queue |
128
+
| <aname="output_unencrypted_sqs_queue_id"></a> [unencrypted\_sqs\_queue\_id](#output\_unencrypted\_sqs\_queue\_id)| The URL for the created Amazon SQS queue |
129
+
| <aname="output_unencrypted_sqs_queue_name"></a> [unencrypted\_sqs\_queue\_name](#output\_unencrypted\_sqs\_queue\_name)| The name of the SQS queue |
130
+
| <aname="output_unencrypted_sqs_queue_url"></a> [unencrypted\_sqs\_queue\_url](#output\_unencrypted\_sqs\_queue\_url)| Same as `queue_id`: The URL for the created Amazon SQS queue |
0 commit comments