-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot add multiple reference variables to AWS::Serverless::Api #20
Comments
I also experienced the same thing with above syntax. |
This could be related to #19. It seems that the way Transform processes references for the API resource may be incorrect. Perhaps it doesn't expand all of them before trying to create the resource, or something along those lines. |
This is a bug in the transform, which fails when validating the structure of Variables property. We are working on fixing it. |
Good to know. Any eta on when a fix will be available? |
No concrete ETA yet. It is in the order of a few days. Will reply back once it done Sorry to keep you folks waiting |
@sanathkr Hi, any news in there. Thank you for the extended example with swagger. |
Yeah, early next week we should have this fixed |
This should be fixed now. Can you verify it works? |
It no longer has the "Type of property 'Variables' is invalid." error, but now variables are not expanded at all, which I describe in #34 . |
Yeah it works perfectly for me, thanks. |
It works for me now, thanks. |
@sanathkr this is still failing for me. Is there something special that I need to do in order to realize the fix? I'm currently using Although, it may be possible that my issue is not the same as just multi environment variables, as I seem to be experiencing it even with just a single environment variable. When I attempt to do
But no clue what the unsupported structure may be |
|
Ah, I see. I came to that realization myself after going backwards in my changes quite a lot to a known good SAM template. It would be fantastic if I could validate more quickly than going through a full deploy. I'm currently attempting to do this all through CodePipeline, which worked previously until my SAM template started getting more complex (added an AWS::Serverless::SimpleTable resource, then added an AWS::DynamoDB::Table resource for a more complex table, then added some environment variables to my functions to reference these table names). So, now I'm attempting to peel everything back one at a time since I can't seem to get an error message that can give me a hint at what may be the problem. Thanks for the quick reply @sanathkr! Any other suggestions on debugging SAM templates? |
At the moment, quickest way to validate is to call I understand this isn't the easiest approach, but it is the quickest at the moment. I am planning on writing a DEBUGGING guide to share this knowledge |
Awesome, a debugging guide would be fantastic! And thanks for all the hard work on this, SAM coupled with CodePipeline and the new CodeBuild functionality fills a huge gap for me! It's great stuff! Also, for what it's worth (and just in case anyone else runs into my same issue), I found what the issue was by small re-additions. It turns out I was thinking I could cleverly name the table in the |
Hi, Doing this the deployment ends up with a transformation error (similar as dinvlad described) if the parameter is used in the scope of AWS::Serverless::Api: |
This won't work now. #22 will fix the problem. |
When adding a AWS::Serverless::Api specifying multiple reference variables causes the message "Number of errors found: 1. Resource with id [TestUploadtestStage] is invalid. Type of property 'Variables' is invalid." when deploying with "aws cloudformation deploy".
I can add either of the variables but cannot add both
Have I just got the syntax incorrect?
The text was updated successfully, but these errors were encountered: