Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions aws/aws_pipes_pipe/.stackgen/stackgen.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions aws/aws_pipes_pipe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# aws_pipes_pipe

Discovery module scaffold for issue #61.

Copied from sibling aws_sqs_queue and adapted for workflow validation.
18 changes: 18 additions & 0 deletions aws/aws_pipes_pipe/aws_pipes_pipe.tf
Original file line number Diff line number Diff line change
@@ -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
}



14 changes: 14 additions & 0 deletions aws/aws_pipes_pipe/basic.tftest.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
mock_provider "aws" {}

# Plan-only smoke test; no assert with literal true (OpenTofu rejects non-referential conditions).
run "basic_plan" {
variables {
name = "test-pipe"
source_arn = "arn:aws:sqs:us-east-1:123456789012:test-queue"
target_arn = "arn:aws:sqs:us-east-1:123456789012:test-target"
role_arn = "arn:aws:iam::123456789012:role/test-role"
kms_master_key_id = null
tags = {}
}
command = plan
}
12 changes: 12 additions & 0 deletions aws/aws_pipes_pipe/outputs.tf.json
Original file line number Diff line number Diff line change
@@ -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}"
}
}
}
21 changes: 21 additions & 0 deletions aws/aws_pipes_pipe/policy.json
Original file line number Diff line number Diff line change
@@ -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}"
]
}
]
}
}

107 changes: 107 additions & 0 deletions aws/aws_pipes_pipe/variables.tf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"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",
"default": null
}
],
"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)",
"default": {}
}
]
}
}
9 changes: 9 additions & 0 deletions aws/aws_pipes_pipe/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_version = ">= 1.0.0, < 2.0.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}