Skip to content
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

bug: Unsupported transform throws incorrect RuntimeError #489

Open
chasepo opened this issue Nov 30, 2023 · 0 comments
Open

bug: Unsupported transform throws incorrect RuntimeError #489

chasepo opened this issue Nov 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@chasepo
Copy link

chasepo commented Nov 30, 2023

What is the problem?

When passing an unsupported resource to the ResourceExtractor, an inaccurate RuntimeError is thrown. Specifically, the resource type referenced in the error message is not the actual resource type passed to the extractor causing the issue.

Reproduction Steps

e.g.

  1. Define an extractor with an unsupported resource type, e.g.
resource_types_to_extract=["AWS::EC2::VPCEndpoint"]
  1. Synthesize the app
  2. View thrown error

What did you expect to happen?

I expected to see the first invalid (or all invalid) resource used in the error message. Based on the example above, I would expect the message to be:

RuntimeError: Error: 
    Unable to find transform for resource type: AWS::IAM::VPCEndpoint.

What actually happened?

However, the output was:

RuntimeError: Error: 
    Unable to find transform for resource type: AWS::IAM::Role.

cdk-enterprise-iac version

0.0.32

Language

Python

Other information

No response

@chasepo chasepo added the bug Something isn't working label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant