crossplane / terrajet

Generate Crossplane Providers from any Terraform Provider
https://crossplane.io
Apache License 2.0
289 stars 38 forks source link

Investigate whether we can use functions directly without the path #98

Closed muvaf closed 2 years ago

muvaf commented 2 years ago

What problem are you facing?

resource.Configuration object accepts all functions with their global path and then during generation it uses the path to print. This is a must for reference generation since all terrajet does is to write the path as comment to the field but we might be able to use the functions directly.

How could Terrajet help solve your problem?

We can look into how we can use resource.Configuration in runtime to access the functions directly so that we get development time errors for signatures and automatic changes by IDE, essentially having it strong-typed. It's not a big deal since we see the problems once generated but dealing with strings is more error prone compared to Go language syntax.

muvaf commented 2 years ago

We have started switching to using functions directly starting with https://github.com/crossplane-contrib/terrajet/pull/124