-
Notifications
You must be signed in to change notification settings - Fork 458
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
CloudFront argument lost during synth #1403
Comments
I think this started with the change to having single item blocks omit the array. There have been a few fixes made since then, but it seems like this case slipped through the cracks. I believe the issue is caused by terraform-cdk/packages/@cdktf/provider-generator/lib/get/generator/emitter/struct-emitter.ts Line 233 in 73a8394
This is doing a "truthy" test rather than an is defined test. I think we can simply update to check that it isn't |
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Community Note
cdktf & Language Versions
Affected Resource(s)
CloudfrontDistributionDefaultCacheBehaviorForwardedValues
has the problemI find it interesting that
CloudfrontDistributionOrderedCacheBehaviorForwardedValues
does not have the problem, despite having a similar method signature, e.g. both havequery_string
as an argument.Debug Output
Here's a repo that reproduce the problem:
https://github.com/cmclaughlin/cdktf-cloudfront-query-string-bug
Running
cdktf deploy
generates this Terraform error:However, changing
query_string
on line 48 ofmain.py
to True will get the plan to pass (but that's not the desired value)Expected Behavior
Plan cleanly w/
query_string=False
Actual Behavior
Terraform
Missing required argument
errorSteps to Reproduce
cdktf deploy
Important Factoids
We recently upgraded from cdktf 0.3 to 0.7.0. We didn't get very far with 0.7.0 before seeing more breaking changes in 0.8.0, so we upgraded to 0.8.1.
I haven't yet narrowed down when or where this problem started... but I don't think we had the problem prior to the recent upgrades.
The text was updated successfully, but these errors were encountered: