Эх сурвалжийг харах

Turn on or off the fair queueing with a variable

Fred Damstra (Macbook 2015) 2 жил өмнө
parent
commit
b2587ef408
2 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 2 0
      config.tf
  2. 1 0
      main.tf

+ 2 - 0
config.tf

@@ -1,5 +1,7 @@
 locals {
   sqs_prefix = "fdamstra-fair-queueing-test-fq"
+  # Set to true to enable fair queue, or false to disable.
+  fair_queueing_enabled = false
 
   # Everything here should be self-explanatory
   profile = "default"

+ 1 - 0
main.tf

@@ -116,6 +116,7 @@ resource "aws_sqs_queue_redrive_allow_policy" "deadletter" {
 }
 
 resource "aws_s3_bucket_notification" "bucket_notification" {
+  count  = local.fair_queueing_enabled ? 1 : 0
   bucket = aws_s3_bucket.bucket.id
 
   queue {