forked from terraform-aws-modules/terraform-aws-sqs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
42 lines (33 loc) · 1.59 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
locals {
create_this_sqs_queue = "${var.kms_master_key_id == "" ? 1 : 0}"
}
resource "aws_sqs_queue" "this" {
count = "${var.create && local.create_this_sqs_queue == 1 ? 1 : 0}"
name = "${var.name}"
visibility_timeout_seconds = "${var.visibility_timeout_seconds}"
message_retention_seconds = "${var.message_retention_seconds}"
max_message_size = "${var.max_message_size}"
delay_seconds = "${var.delay_seconds}"
receive_wait_time_seconds = "${var.receive_wait_time_seconds}"
policy = "${var.policy}"
redrive_policy = "${var.redrive_policy}"
fifo_queue = "${var.fifo_queue}"
content_based_deduplication = "${var.content_based_deduplication}"
tags = "${var.tags}"
}
resource "aws_sqs_queue" "this_with_kms" {
count = "${var.create && local.create_this_sqs_queue == 0 ? 1 : 0}"
name = "${var.name}"
visibility_timeout_seconds = "${var.visibility_timeout_seconds}"
message_retention_seconds = "${var.message_retention_seconds}"
max_message_size = "${var.max_message_size}"
delay_seconds = "${var.delay_seconds}"
receive_wait_time_seconds = "${var.receive_wait_time_seconds}"
policy = "${var.policy}"
redrive_policy = "${var.redrive_policy}"
fifo_queue = "${var.fifo_queue}"
content_based_deduplication = "${var.content_based_deduplication}"
kms_master_key_id = "${var.kms_master_key_id}"
kms_data_key_reuse_period_seconds = "${var.kms_data_key_reuse_period_seconds}"
tags = "${var.tags}"
}