fierce-rainbow-21947
04/19/2024, 10:33 AMmake tfgen
I get errors like
warning: unable to convert HCL example for Pulumi entity '#/functions/xenorchestra:index/getHosts:getHosts': 6 errors occurred:
* :17,3-6: Argument or block definition required; An argument or block definition is required here.
* :17,3-6: Argument or block definition required; An argument or block definition is required here.
* :17,3-6: Argument or block definition required; An argument or block definition is required here.
* :17,3-6: Argument or block definition required; An argument or block definition is required here.
* :17,3-6: Argument or block definition required; An argument or block definition is required here.
* :17,3-6: Argument or block definition required; An argument or block definition is required here.
where do I find the HCL that pulumi can't convert?big-architect-71258
04/19/2024, 12:32 PMfierce-rainbow-21947
04/19/2024, 12:35 PMfierce-rainbow-21947
04/19/2024, 12:35 PMfierce-rainbow-21947
04/19/2024, 12:36 PMbig-architect-71258
04/19/2024, 12:40 PMmake provider
you'll find a statistic about how much of the documentation an examples have been successfully converted. From my experience everything above 90% or 95% I'd consider a success.
But let me have a quick look at the TF documentation if I can spot any issues that could be resolved quickly.big-architect-71258
04/19/2024, 12:58 PMwarning: error: Failure in parsing resource name: xenorchestra_vm, subsection: ## Schema
.
So the overall percentage of converted documentation doesn't look pretty good.
Provider: xenorchestra
Success rate: 71.43% (90/126)
Converted 76.19% of csharp examples (16/21)
Converted 76.19% of go examples (16/21)
Converted 61.90% of java examples (13/21)
Converted 76.19% of python examples (16/21)
Converted 76.19% of typescript examples (16/21)
Converted 61.90% of yaml examples (13/21)
big-architect-71258
04/19/2024, 1:00 PMhashicorp/terraform-plugin-docs
look okay to me.big-architect-71258
04/19/2024, 1:09 PMProvider: xenorchestra
Success rate: 86.11% (93/108)
Converted 88.89% of csharp examples (16/18)
Converted 88.89% of go examples (16/18)
Converted 88.89% of java examples (16/18)
Converted 88.89% of python examples (16/18)
Converted 88.89% of typescript examples (16/18)
Converted 72.22% of yaml examples (13/18)
Please upgrade:
<http://github.com/pulumi/pulumi-terraform-bridge/v3|github.com/pulumi/pulumi-terraform-bridge/v3> v3.80.0
<http://github.com/pulumi/pulumi/sdk/v3|github.com/pulumi/pulumi/sdk/v3> v3.113.0
And
<http://github.com/hashicorp/terraform-plugin-sdk/v2|github.com/hashicorp/terraform-plugin-sdk/v2> => <http://github.com/pulumi/terraform-plugin-sdk/v2|github.com/pulumi/terraform-plugin-sdk/v2> v2.0.0-20240229143312-4f60ee4e2975
big-architect-71258
04/19/2024, 1:15 PMunknown function 'tomap';
and Failed to generate YAML program: *model.UnaryOpExpression; Unimplemented! Needed for -1
I still see 3,11-12: Invalid character; This character is not used within the language., and 5 other diagnostic(s)
and :17,3-6: Argument or block definition required; An argument or block definition is required here.
which I can't explain.
@ancient-policeman-24615 any idea on this?
warning: unable to convert HCL example for Pulumi entity '#/resources/xenorchestra:index/vm:Vm'. The example will be dropped from any generated docs or SDKs: 1 error occurred:
* [csharp, go, java, python, typescript, yaml] :3,11-12: Invalid character; This character is not used within the language., and 5 other diagnostic(s)
warning: unable to convert HCL example for Pulumi entity '#/functions/xenorchestra:index/getHosts:getHosts'. The example will be dropped from any generated docs or SDKs: 1 error occurred:
* [csharp, go, java, python, typescript, yaml] :17,3-6: Argument or block definition required; An argument or block definition is required here.
Respective docs should be:
#/resources/xenorchestra:index/vm:Vm
https://github.com/vatesfr/terraform-provider-xenorchestra/blob/master/docs/resources/vm.md
'#/functions/xenorchestra:index/getHosts:getHosts'
https://github.com/vatesfr/terraform-provider-xenorchestra/blob/master/docs/data-sources/hosts.mdancient-policeman-24615
04/19/2024, 2:03 PMβ¦
blocks in their example HCL.big-architect-71258
04/19/2024, 2:05 PMenough-garden-22763
04/19/2024, 3:22 PMCOVERAGE_OUTPUT_DIR="$PWD/cov" tfgen
then extracting the failing test case from ./cov/byExample.json
. These can be then reported to https://github.com/pulumi/pulumi-converter-terraform - I've in fact have been doing some of this as we're rolling out an update to internal providers to start using an improved Terraform converter hosted at this repository.enough-garden-22763
04/19/2024, 3:23 PMenough-garden-22763
04/19/2024, 3:24 PMbig-architect-71258
04/19/2024, 3:24 PMenough-garden-22763
04/19/2024, 3:24 PMenough-garden-22763
04/19/2024, 3:25 PMmake tfgen
points to COVERAGE_OUTPUT_DIR variable but admittedly this flow with finding example failures is a bit arcaneenough-garden-22763
04/19/2024, 3:25 PMbig-architect-71258
04/19/2024, 3:26 PMjson
file you mentioned if you like.enough-garden-22763
04/19/2024, 3:27 PMenough-garden-22763
04/19/2024, 3:28 PMenough-garden-22763
04/19/2024, 3:33 PMbig-architect-71258
04/19/2024, 3:47 PMCOVERAGE_OUTPUT_DIR="$PWD/cov" make tfgen
-rw------- 1 user user 85281 Apr 19 17:44 byExample.json
-rw------- 1 user user 4440 Apr 19 17:44 byLanguage.json
-rw------- 1 user user 319 Apr 19 17:44 shortSummary.txt
-rw------- 1 user user 1017 Apr 19 17:44 summary.json
-rw------- 1 user user 25970 Apr 19 17:44 summary.md
As I understood I should open a issue in https://github.com/pulumi/pulumi-converter-terraform. Right?
Were to put the files? Creating GIST in my account? Or what's the preferred way?enough-garden-22763
04/19/2024, 3:50 PMenough-garden-22763
04/19/2024, 3:50 PMbig-architect-71258
04/19/2024, 3:54 PMtomap
HCL function. I think there are 3 problems left. Opening 3 separate issues?enough-garden-22763
04/19/2024, 3:54 PMbig-architect-71258
04/19/2024, 3:55 PMenough-garden-22763
04/19/2024, 3:55 PMbig-architect-71258
04/19/2024, 4:34 PMhcl
or terraform
which are actually no Terraform (HCL) at all. Or using ...
instead of completely specifying at least all required properties for a resource.
I think I gonna close the issue I opened because I jumped to quickly on my conclusions about what is happening.enough-garden-22763
04/19/2024, 4:35 PMenough-garden-22763
04/19/2024, 4:35 PMenough-garden-22763
04/19/2024, 4:36 PMenough-garden-22763
04/19/2024, 4:36 PMenough-garden-22763
04/19/2024, 4:37 PMbig-architect-71258
04/19/2024, 4:39 PM<https://raw.githubusercontent.com/vatesfr/terraform-provider-xenorchestra/master/docs/data-sources/hosts.md>
complete the resource declaration for xenorchestra_vm
. ...
are not valid here.
2. Ensure that code blocks which are tagged with hcl
or terraform
contain correct Terraform (HCL) code. <https://raw.githubusercontent.com/vatesfr/terraform-provider-xenorchestra/master/docs/resources/vm.md>
The #cloud-config
is not valid TF code. Please tag the code block with another type.
I think that should drive the TFGEN success rate to >90%
.big-architect-71258
04/19/2024, 4:41 PMvatesfr
controls the Terraform and the bridged Pulumi provider. So it should be easy for them to get the issues in the TF provider docs straight. πbig-architect-71258
04/19/2024, 4:42 PMcov
files were really, really valuable to pin down the issues! GREAT FEATURE!!!enough-garden-22763
04/19/2024, 4:49 PMfierce-rainbow-21947
04/21/2024, 8:28 AMfierce-rainbow-21947
04/22/2024, 4:05 PMbig-architect-71258
04/22/2024, 4:07 PM