Skip to content
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

Remove cross-references too specific to TR registry examples #61

Open
ezgidemirel opened this issue Aug 5, 2022 · 0 comments
Open

Remove cross-references too specific to TR registry examples #61

ezgidemirel opened this issue Aug 5, 2022 · 0 comments
Labels
codegen enhancement New feature or request v2
Milestone

Comments

@ezgidemirel
Copy link
Member

What problem are you facing?

We started to inject cross-references based on the examples coming from Terraform registry. Sometimes, these references may support multiple types or sometimes do not refer to the leaf reference. For example, target_host_name, might be a Linux VM or a Microsoft VM. Another example might be network_interface_id in here. There exists a separate resource type called network_interface but due to this example, we're referring to an EC2 instance to get the value.

Therefore we need to be careful about what we inject while configuring the resources and delete the ones which may not make sense like here.

How could Terrajet help solve your problem?

Unfortunately, there is no straightforward solution to this problem. One thing we may implement is traversing references to reach out to the leaf one and use its type in the resolver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen enhancement New feature or request v2
Projects
None yet
Development

No branches or pull requests

2 participants