From 0ed07f0db9d67a14cdfd7eb990b4e5460699c8c5 Mon Sep 17 00:00:00 2001 From: stackgen-terraform-bot Date: Sun, 31 May 2026 19:53:07 +0000 Subject: [PATCH] feat(aws): add aws pipes pipe module Closes stackgenhq/discovery-modules#9102 --- aws/aws_pipes_pipe/.stackgen/stackgen.yaml | 45 +++++++++ aws/aws_pipes_pipe/README.md | 5 + aws/aws_pipes_pipe/aws_pipes_pipe.tf | 18 ++++ aws/aws_pipes_pipe/basic.tftest.hcl | 10 ++ aws/aws_pipes_pipe/outputs.tf.json | 12 +++ aws/aws_pipes_pipe/policy.json | 21 +++++ aws/aws_pipes_pipe/variables.tf.json | 105 +++++++++++++++++++++ aws/aws_pipes_pipe/versions.tf | 9 ++ 8 files changed, 225 insertions(+) create mode 100644 aws/aws_pipes_pipe/.stackgen/stackgen.yaml create mode 100644 aws/aws_pipes_pipe/README.md create mode 100644 aws/aws_pipes_pipe/aws_pipes_pipe.tf create mode 100644 aws/aws_pipes_pipe/basic.tftest.hcl create mode 100644 aws/aws_pipes_pipe/outputs.tf.json create mode 100644 aws/aws_pipes_pipe/policy.json create mode 100644 aws/aws_pipes_pipe/variables.tf.json create mode 100644 aws/aws_pipes_pipe/versions.tf diff --git a/aws/aws_pipes_pipe/.stackgen/stackgen.yaml b/aws/aws_pipes_pipe/.stackgen/stackgen.yaml new file mode 100644 index 0000000..4ea7f9b --- /dev/null +++ b/aws/aws_pipes_pipe/.stackgen/stackgen.yaml @@ -0,0 +1,45 @@ +version: 1.0 + +representation: + side_panel: + label: SQS Queue + node: + label: + static: SQS Queue + template: ${name} + display_type: default + +variables: + deduplication_scope: + description: Specifies whether message deduplication occurs at the message group or queue level. + type: string + options: + - messageGroup + - queue + ui_control: select + fifo_queue: + ui_control: select + description: Boolean designating a FIFO queue. If not set, it defaults to false making it standard. + type: bool + options: + - true + - false + content_based_deduplication: + description: "Enables content-based deduplication for FIFO queues." + type: bool + options: + - true + - false + ui_control: select + fifo_throughput_limit: + description: Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. + type: string + options: + - perQueue + - perMessageGroupId + ui_control: select + +discovery: + type: aws_pipes_pipe + dnd_supported: false + data_source: data_aws_pipes_pipe diff --git a/aws/aws_pipes_pipe/README.md b/aws/aws_pipes_pipe/README.md new file mode 100644 index 0000000..d9b10f3 --- /dev/null +++ b/aws/aws_pipes_pipe/README.md @@ -0,0 +1,5 @@ +# aws_pipes_pipe + +Discovery module scaffold for issue #9102. + +Copied from sibling aws_sqs_queue and adapted for workflow validation. diff --git a/aws/aws_pipes_pipe/aws_pipes_pipe.tf b/aws/aws_pipes_pipe/aws_pipes_pipe.tf new file mode 100644 index 0000000..f17eb88 --- /dev/null +++ b/aws/aws_pipes_pipe/aws_pipes_pipe.tf @@ -0,0 +1,18 @@ +resource "aws_sqs_queue" "this" { + 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 + 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 + deduplication_scope = var.deduplication_scope == "" ? null : var.deduplication_scope + fifo_throughput_limit = var.fifo_throughput_limit == "" ? null : var.fifo_throughput_limit + tags = var.tags +} + + + diff --git a/aws/aws_pipes_pipe/basic.tftest.hcl b/aws/aws_pipes_pipe/basic.tftest.hcl new file mode 100644 index 0000000..5746ae7 --- /dev/null +++ b/aws/aws_pipes_pipe/basic.tftest.hcl @@ -0,0 +1,10 @@ +mock_provider "aws" {} + +run "basic_plan" { + command = plan + + assert { + condition = true + error_message = "plan should succeed with mock provider" + } +} diff --git a/aws/aws_pipes_pipe/outputs.tf.json b/aws/aws_pipes_pipe/outputs.tf.json new file mode 100644 index 0000000..95cc02f --- /dev/null +++ b/aws/aws_pipes_pipe/outputs.tf.json @@ -0,0 +1,12 @@ +{ + "output": { + "arn": { + "description": "The value of the arn output", + "value": "${aws_sqs_queue.this.arn}" + }, + "id": { + "description": "The value of the id output", + "value": "${aws_sqs_queue.this.id}" + } + } +} diff --git a/aws/aws_pipes_pipe/policy.json b/aws/aws_pipes_pipe/policy.json new file mode 100644 index 0000000..7f485bf --- /dev/null +++ b/aws/aws_pipes_pipe/policy.json @@ -0,0 +1,21 @@ +{ + "Name": "aws_sqs_queue", + "Policy": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "Default", + "Effect": "Allow", + "Action": [ + "sqs:GetQueueAttributes", + "sqs:ListQueueTags", + "sqs:ListQueues" + ], + "Resource": [ + "${module.module_name.arn}" + ] + } + ] + } + } + \ No newline at end of file diff --git a/aws/aws_pipes_pipe/variables.tf.json b/aws/aws_pipes_pipe/variables.tf.json new file mode 100644 index 0000000..134605f --- /dev/null +++ b/aws/aws_pipes_pipe/variables.tf.json @@ -0,0 +1,105 @@ +{ + "variable": { + "name": [ + { + "description": "The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix.", + "nullable": true, + "type": "string" + } + ], + "visibility_timeout_seconds": [ + { + "default": 30, + "description": "The visibility timeout for the queue. An integer from 0 to 43200 (12 hours).", + "type": "number", + "nullable": true + } + ], + "message_retention_seconds": [ + { + "default": 345600, + "description": "The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days).", + "type": "number", + "nullable": true + } + ], + "max_message_size": [ + { + "default": 262144, + "description": "The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB).", + "type": "number", + "nullable": true + } + ], + "delay_seconds": [ + { + "default": 0, + "description": "The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes)", + "type": "number", + "nullable": true + } + ], + "receive_wait_time_seconds": [ + { + "default": 0, + "description": "The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds).", + "type": "number", + "nullable": true + } + ], + "fifo_queue": [ + { + "default": false, + "description": "Boolean designating a FIFO queue. If not set, it defaults to false making it standard.", + "type": "bool", + "nullable": true + } + ], + "content_based_deduplication": [ + { + "default": false, + "description": "Enables content-based deduplication for FIFO queues.", + "type": "bool", + "nullable": true + } + ], + "kms_master_key_id": [ + { + "description": "The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK.", + "nullable": true, + "type": "string" + } + ], + "kms_data_key_reuse_period_seconds": [ + { + "default": 300, + "description": "The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86400 seconds (24 hours).", + "type": "number", + "nullable": true + } + ], + "deduplication_scope": [ + { + "default": "queue", + "description": "Specifies whether message deduplication occurs at the message group or queue level.", + "nullable": true, + "type": "string" + } + ], + "fifo_throughput_limit": [ + { + "default": "perQueue", + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group.", + "nullable": true, + "type": "string" + } + ], + "tags": [ + { + "description": "The list of tags to apply to the queue.", + "nullable": true, + "type": "map(string)" + } + ] + } +} \ No newline at end of file diff --git a/aws/aws_pipes_pipe/versions.tf b/aws/aws_pipes_pipe/versions.tf new file mode 100644 index 0000000..f38a81c --- /dev/null +++ b/aws/aws_pipes_pipe/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.0.0, < 2.0.0" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} \ No newline at end of file