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

Fix count interpolation with computed values #10418

Closed

Conversation

greenboxal
Copy link

@greenboxal greenboxal commented Nov 29, 2016

This commit enables the use computed values when interpolating
the count special variable.

This is achieved by defering the expansion of count during
walkInput and walkValidate as the real value isn't necessary
at this point.

The value will be resolved during walkRefresh and DynamicExpand
will work as expected.

Partially fixes #3888.

@edit
I'm not sure on how write tests for this. I tested with this snippet and it works: https://gist.github.com/greenboxal/113469077550fa1f6c65d4db7f22ba27

Can someone guide me on this?

This commit enables the use computed values when interpolating
the count special variable.

This is achieved by defering the expansion of `count` during
walkInput and walkValidate as the real value isn't necessary
at this point.

The value will be resolved during walkRefresh and DynamicExpand
will work as expected.

Partially fixes hashicorp#3888.
@greenboxal greenboxal force-pushed the fix-count-interpolation branch from bbff7b0 to 07fb64d Compare November 29, 2016 18:02
@mitchellh
Copy link
Contributor

This is a good set of information, but I think for input and validate we'll have a good solution when we switch to a new graph that simply ignores the count variable full out. :) refresh, input, and validate are still using the old graphs!

If this works for you though, feel free to patch and use it.

Thanks for the input! :)

@mitchellh mitchellh closed this Nov 29, 2016
@greenboxal
Copy link
Author

@mitchellh Nice. Do you have any prevision on when this will be available?

For now, I'll keep using this solution.

@mitchellh
Copy link
Contributor

Was hoping we could get it into 0.8 but the freeze came up on us. :)

So, 0.9, probably released as an experimental feature behind a flag in 0.8.x sometime.

@cemo
Copy link

cemo commented Jan 26, 2017

@mitchellh will this issue be fixed with 0.9? You have recently implemented a dozen features and this is a really huge problem for terraformers.

@mitchellh
Copy link
Contributor

I'm hoping it improves with 0.9, but I'm not 100% sure. 0.9 betas will start in Feb and we need to get it in before that window. I'm trying though!

@cemo
Copy link

cemo commented Jan 26, 2017

We are grateful for the all thing you have done. Thank you again.

@ghost
Copy link

ghost commented Apr 17, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants