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

Change the way of transferring hcl.Body into the plugin side #89

Closed
wata727 opened this issue Dec 30, 2020 · 1 comment
Closed

Change the way of transferring hcl.Body into the plugin side #89

wata727 opened this issue Dec 30, 2020 · 1 comment

Comments

@wata727
Copy link
Member

wata727 commented Dec 30, 2020

Currently, hcl.Body is transferred between the host and the plugin in the same way as hcl.Expression (serialization by source code and start position). However, this way has the problem that the merged body cannot be transferred because the range of the merged body spans multiple files.

The solution is to expose an interface like body.Content to the plugin side and get the body content based on the schema specified by the plugin in advance, instead of transferring the whole body. See hashicorp/hcl#332 (comment)

So we need to change the methods of the Runner interface:

  • WalkResourceBlocks
  • WalkResources
  • WalkModuleCalls
  • Backend
  • Config
  • RootProvider

This change plan is a draft. In fact, it may be affected by Terraform's package internalization.

@wata727
Copy link
Member Author

wata727 commented Apr 2, 2022

@wata727 wata727 closed this as completed Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant