I should be able to copy an example stanza from the provider docs and have the relevant python code generated.
Actual Behavior
Adding package @cdktf/provider-cloudflare @ 11.11.0
Internal Error: unexpected array
Error: unexpected array
at Parser.renderAttributeType (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:205:23)
at Parser.renderAttributesForBlock (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:264:31)
at Parser.resourceFrom (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:124:31)
at ResourceParser.parse (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:466:33)
at /usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/provider-generator.js:94:121
at Array.map (<anonymous>)
at TerraformProviderGenerator.buildResourceModels (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/provider-generator.js:94:75)
at /usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2cdk/lib/index.js:93:31
at Array.reduce (<anonymous>)
at convertToTypescript (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2cdk/lib/index.js:91:79)
Collecting Debug Information...
/usr/local/lib/node_modules/cdktf-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
Error: unexpected array
at Parser.renderAttributeType (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:205:23)
at Parser.renderAttributesForBlock (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:264:31)
at Parser.resourceFrom (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:124:31)
at ResourceParser.parse (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/resource-parser.js:466:33)
at /usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/provider-generator.js:94:121
at Array.map (<anonymous>)
at TerraformProviderGenerator.buildResourceModels (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/provider-generator/lib/get/generator/provider-generator.js:94:75)
at /usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2cdk/lib/index.js:93:31
at Array.reduce (<anonymous>)
at convertToTypescript (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2cdk/lib/index.js:91:79) {
language: 'python',
__type: 'Internal'
}
Node.js v20.13.1
Steps to Reproduce
add cloudflare/cloudflare to your providers in a cdktf project
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Expected Behavior
I should be able to copy an example stanza from the provider docs and have the relevant python code generated.
Actual Behavior
Steps to Reproduce
pbpaste | grep -v "^#" | cdktf convert --language python --provider cloudflare/cloudflare
Versions
language: python cdktf-cli: 0.20.7 node: v20.13.1 cdktf: 0.20.7 constructs: 10.3.0 jsii: 1.98.0 terraform: 1.8.4 arch: x64 os: darwin 21.6.0 python: Python 3.12.3 pip: null pipenv: pipenv, version 2023.12.1 providers aws@undefined (LOCAL) terraform provider version: 5.49.0 cloudflare/cloudflare@undefined (LOCAL) terraform provider version: 4.33.0 cdktf-cdktf-provider-aws (PREBUILT) terraform provider version: 5.43.0 prebuilt provider version: 19.12.0 cdktf version: ^0.20.0 cdktf-cdktf-provider-cloudflare (PREBUILT) terraform provider version: 4.33.0 prebuilt provider version: 11.11.0 cdktf version: ^0.20.0
Providers
────────────────────────────┬──────┬────────┬──────────────────────────────────┐ ────── ───── ── ─── ────────── ──── Provider Name Provider │ CDKTF│ Constra│ Package Name Package │ Version nt Version ────────────────────────────┼──────┼────────┼──────────────────────────────────┤ ────── ───── ── ─── ────────── ──── aws 5.49.0 │ │ │ │
────────────────────────────┼──────┼────────┼──────────────────────────────────┤ ────── ───── ── ─── ────────── ──── cloudflare/clou 4.33.0 │ │ │ │ flare ────────────────────────────┼──────┼────────┼──────────────────────────────────┤ ────── ───── ── ─── ────────── ──── aws 5.43.0 │ │ │ cdktf-cdktf-provider- 19.12.0 │ ^0.20.0 ws
────────────────────────────┼──────┼────────┼──────────────────────────────────┤ ────── ───── ── ─── ────────── ──── cloudflare/clou 4.33.0 │ │ │ cdktf-cdktf-provider- 11.11.0 │ flare ^0.20.0 loudflare
────────────────────────────┴──────┴────────┴──────────────────────────────────┘ ────── ───── ── ─── ────────── ────
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
Help Wanted
Community Note