Skip to content

fix: remove cross-variable validation that broke tonumber("latest")#43

Merged
LorisFriedel merged 1 commit into
mainfrom
loris.friedel/fix-sqs-validation-issue-40
Apr 2, 2026
Merged

fix: remove cross-variable validation that broke tonumber("latest")#43
LorisFriedel merged 1 commit into
mainfrom
loris.friedel/fix-sqs-validation-issue-40

Conversation

@LorisFriedel

Copy link
Copy Markdown
Member

Summary

Fixes #40 — since v1.3.1, all Terraform plans fail with Invalid function argument because Terraform does not short-circuit &&/|| in validation conditions. The bare tonumber(var.layer_version) outside can() blows up when layer_version is "latest" (the default), breaking all users — not just SQS users.

Changes

  • variables.tf — Remove the cross-variable validation block on dd_sqs_queue_url that checked layer_version >= 97. The layer version requirement remains documented in the variable description.
  • README.md — Add "requires layer version >= 97" to the dd_sqs_queue_url description in the inputs table.
  • tests/sqs_failed_events.tftest.hcl — Remove sqs_with_old_layer_version_fails and sqs_with_layer_version_97 test cases that asserted on the deleted validation.

…tonumber("latest")

Terraform does not short-circuit &&/|| in validation conditions, so the
bare tonumber(var.layer_version) call outside can() fails when
layer_version is "latest" (the default). This broke all users after
v1.3.1, not just SQS users.

Remove the cross-variable validation entirely — the layer version
requirement is already documented in the variable description and now
also in the README.

Fixes #40

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@LorisFriedel LorisFriedel marked this pull request as ready for review April 2, 2026 15:46
@LorisFriedel LorisFriedel requested a review from a team as a code owner April 2, 2026 15:46
@LorisFriedel LorisFriedel merged commit 61572fe into main Apr 2, 2026
4 checks passed
@LorisFriedel LorisFriedel deleted the loris.friedel/fix-sqs-validation-issue-40 branch April 2, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terraform plan failing after release 1.3.1 this morning with Error: Invalid function argument

2 participants