forked from terraform-aws-modules/terraform-aws-sqs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
57 lines (46 loc) · 2.08 KB
/
outputs.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
################################################################################
# Queue
################################################################################
output "queue_id" {
description = "The URL for the created Amazon SQS queue"
value = try(aws_sqs_queue.this[0].id, null)
}
output "queue_arn" {
description = "The ARN of the SQS queue"
value = try(aws_sqs_queue.this[0].arn, null)
}
output "queue_arn_static" {
description = "The ARN of the SQS queue. Use this to avoid cycle errors between resources (e.g., Step Functions)"
value = var.create && !var.use_name_prefix ? "arn:aws:sqs:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:${local.name}" : ""
}
output "queue_url" {
description = "Same as `queue_id`: The URL for the created Amazon SQS queue"
value = try(aws_sqs_queue.this[0].url, null)
}
output "queue_name" {
description = "The name of the SQS queue"
value = try(aws_sqs_queue.this[0].name, null)
}
################################################################################
# Dead Letter Queue
################################################################################
output "dead_letter_queue_id" {
description = "The URL for the created Amazon SQS queue"
value = try(aws_sqs_queue.dlq[0].id, null)
}
output "dead_letter_queue_arn" {
description = "The ARN of the SQS queue"
value = try(aws_sqs_queue.dlq[0].arn, null)
}
output "dead_letter_queue_arn_static" {
description = "The ARN of the SQS queue. Use this to avoid cycle errors between resources (e.g., Step Functions)"
value = var.create && var.create_dlq && !var.use_name_prefix ? "arn:aws:sqs:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:${local.dlq_name}" : ""
}
output "dead_letter_queue_url" {
description = "Same as `dead_letter_queue_id`: The URL for the created Amazon SQS queue"
value = try(aws_sqs_queue.dlq[0].url, null)
}
output "dead_letter_queue_name" {
description = "The name of the SQS queue"
value = try(aws_sqs_queue.dlq[0].name, null)
}