From 2b2689de9371fdada749783f36553425979d9467 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Tue, 30 Jan 2024 08:47:43 +0000 Subject: [PATCH] SQS: Add missing property SQSManagedSSEEnabled (#7279) --- moto/sqs/models.py | 2 ++ other_langs/terraform/sqs/provider.tf | 44 +++++++++++++++++++++++++++ other_langs/terraform/sqs/queue.tf | 12 ++++++++ 3 files changed, 58 insertions(+) create mode 100644 other_langs/terraform/sqs/provider.tf create mode 100644 other_langs/terraform/sqs/queue.tf diff --git a/moto/sqs/models.py b/moto/sqs/models.py index ee77bc13e..12d88e661 100644 --- a/moto/sqs/models.py +++ b/moto/sqs/models.py @@ -243,6 +243,7 @@ class Queue(CloudFormationModel): "RedrivePolicy", "ReceiveMessageWaitTimeSeconds", "VisibilityTimeout", + "SqsManagedSseEnabled", ] FIFO_ATTRIBUTES = [ "ContentBasedDeduplication", @@ -298,6 +299,7 @@ class Queue(CloudFormationModel): "ReceiveMessageWaitTimeSeconds": 0, "RedrivePolicy": None, "VisibilityTimeout": 30, + "SqsManagedSseEnabled": True, } defaults.update(kwargs) diff --git a/other_langs/terraform/sqs/provider.tf b/other_langs/terraform/sqs/provider.tf new file mode 100644 index 000000000..8b87a1c0e --- /dev/null +++ b/other_langs/terraform/sqs/provider.tf @@ -0,0 +1,44 @@ +provider "aws" { + region = "us-east-1" + s3_use_path_style = true + skip_credentials_validation = true + skip_metadata_api_check = true + skip_requesting_account_id = true + + endpoints { + acm = "http://localhost:5000" + apigateway = "http://localhost:5000" + cloudformation = "http://localhost:5000" + cloudwatch = "http://localhost:5000" + dynamodb = "http://localhost:5000" + es = "http://localhost:5000" + firehose = "http://localhost:5000" + iam = "http://localhost:5000" + kinesis = "http://localhost:5000" + lambda = "http://localhost:5000" + route53 = "http://localhost:5000" + redshift = "http://localhost:5000" + s3 = "http://localhost:5000" + secretsmanager = "http://localhost:5000" + ses = "http://localhost:5000" + sns = "http://localhost:5000" + sqs = "http://localhost:5000" + ssm = "http://localhost:5000" + stepfunctions = "http://localhost:5000" + sts = "http://localhost:5000" + ec2 = "http://localhost:5000" + } + + access_key = "my-access-key" + secret_key = "my-secret-key" +} + +terraform { + required_providers { + + aws = { + source = "hashicorp/aws" + version = "4.67.0" + } + } +} \ No newline at end of file diff --git a/other_langs/terraform/sqs/queue.tf b/other_langs/terraform/sqs/queue.tf new file mode 100644 index 000000000..03c65be0c --- /dev/null +++ b/other_langs/terraform/sqs/queue.tf @@ -0,0 +1,12 @@ +resource "aws_sqs_queue" "queue" { + name = "test-queue" + fifo_queue = false + delay_seconds = 0 + max_message_size = 16384 + message_retention_seconds = 86400 + visibility_timeout_seconds = 30 + receive_wait_time_seconds = 0 + redrive_policy = null + content_based_deduplication = false + sqs_managed_sse_enabled = true +} \ No newline at end of file