Skip to content

raise validationException if resource does not exist in CFn #12202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

pinzon
Copy link
Member

@pinzon pinzon commented Jan 29, 2025

Motivation

This PR adds make the CFn provider return the correct exception type in case the DescribeStackResource is called for a resource that doesn't exist. The Serverless-cli tool would do this before re-deploying a stack and the users would be confuse about the LocalStack logs.

Changes

  • Raise and return ValidationException when a resource doesn't exists

Testing

  • new aws validated test.

@silv-io silv-io added the semver: patch Non-breaking changes which can be included in patch releases label Jan 29, 2025
@pinzon pinzon added this to the Playground milestone Jan 29, 2025
Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 52m 3s ⏱️ - 1m 19s
4 072 tests +1  3 757 ✅ +1  315 💤 ±0  0 ❌ ±0 
4 074 runs  +1  3 757 ✅ +1  317 💤 ±0  0 ❌ ±0 

Results for commit 47a3f3b. ± Comparison against base commit a3cd603.

@pinzon pinzon marked this pull request as ready for review January 29, 2025 12:18
Copy link
Contributor

@simonrw simonrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for adding this extra parity!

@pinzon pinzon changed the title raise validationException if resource doesn't exist in CFn raise validationException if resource does not exist in CFn Jan 30, 2025
@pinzon pinzon merged commit 96d99d6 into master Jan 30, 2025
34 checks passed
@pinzon pinzon deleted the cloudformation/feat/validation-of-resource-in-stack branch January 30, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants