Description
This is the primary tracking issue for the work described in Static Evaluation of Provider Iteration, which was written as part of #1649.
Related feature requests:
The work represented by this issue is intended to be completed for the OpenTofu v1.9.0 release.
Note
What is an "RFC tracking issue" anyway?
This issue is intended as a trial-run of the process described in a not-yet-approved process RFC proposed in #2100.
Because that process change has not yet been adopted, and because this tracking issue was created retroactively for an RFC whose work was already in progress, this particular tracking issue is likely to be used a little inconsistently and might not follow the described process exactly; @apparentlymart is maintaining it on a best-effort basis to get some experience with how tracking issues might work in practice and learn from any questions or challenges that arise.
Hopefully this does also serve a useful direct purpose as a tracking issue, but I apologize in advance if anything goes amiss here that makes this a less-than-accurate reflection of the project.
Feature-completion Tasks
The following are broad items of work we'd need to finish before work on this RFC is "feature complete" and thus ready for enthusiastic testing, though not necessarily yet release-ready (there will probably be some bugs).
This set of items is intended to align with the first "beta" release. We will probably make an alpha release before this list is 100% resolved to request early feedback on the overall design and primary behavior. This list can keep growing until we reach the first beta, after which we'll switch to using the "Final release-blocking Tasks" section below.
-
(Various earlier work on this project is not captured here because it significantly predates the creation of this tracking issue. Sorry! At least some of it is represented by #300: Implement statically evaluated provider references #2054 .)
-
Explore what constraints we ought to keep in mind to leave room for fully-dynamic provider configuration expansion later: RFC: Dynamic Provider Instances and Instance Assignment #2088
(Merging the other RFC PR is not a requirement for this item to be completed, only that we've developed it enough to decide what changes we want to make to this project's RFC for the next item.)
-
Revise the initial RFC to include what we learned from the dynamic-expansion exploration: RFC: Updated "Static Evaluation of Provider Iteration" #2115
@apparentlymart is driving this.
-
Implementation of the main functionality described in the revised PR:
- Implement Provider for_each #2105
- Fix tests for dynamic provider mapping #2111
- Partial revert of #1911, support provider for_each in aliases #2121
@cam72cam is driving these final implementation tasks.
-
v1.9.0-alpha1 and v1.9.0-alpha2 feedback
-
Detect when provider and resource/module have identical for_each #2186
-
Early/internal testing: OpenTofu Core team members and interested+adventurous community members test using either builds from
main
or an alpha release to give early feedback. (Could potentially add new items to this list, or to the other lists below.)- Invite those watching Dynamic provider configuration assignment #300 to participate.
Dynamic provider configuration assignment #300 (comment) - Post the feature preview video. (alpha) @abstractionfactory
- "Help us test" blog post
- Invite those watching Dynamic provider configuration assignment #300 to participate.
-
First round of reference documentation updates; at least enough for those participating in beta feedback to understand how this works without having to dig into the RFC.
@apparentlymart is driving the documentation updates.
Final release-blocking Tasks
The following are items that must be completed before the final release of these features. This list can grow during the prerelease testing period.
- Unable to destroy resources with for_each providers #2269
- OpenTofu 1.9 provider cannot be selected using for_each although deterministic key is used #2277
- provider for_each recieves input variables that haven't been type-converted, de-nulled, or validated #2268
- RFC: "Static Evaluation of Provider Iteration" state snapshot revisions #2284
- Changelog entry under "New Features"
- Finalized reference documentation
- We didn't get any significant feedback on the first round of docs, so we'll just ship with that and iterate later if necessary.
- Dynamic Provider issue: provider not initialized #2334
- Warning while using for_each in provider configuration #2342
- Release announcement content:
- Release blog post @abstractionfactory
Post-release tasks
The following tasks could potentially wait until after final release, but should still get done. (There's no harm in doing items from this list before the final release instead, where possible.)
- Post the release blog post.
- Create pre-emptive feature request issues for each of the likely future requests ("missing features") we identified in the RFC, to encourage emoji-voting and other feedback on them to be created in a central place.
Deferred Tasks
The following are tasks that were previously in one of the lists above but we have intentionally taken them out of scope for this first round of work. If this issue is closed before these are all resolved then we should ensure that each unresolved one has an open issue to track it as future work.
-
Support for
for_each
inprovider
blocks in text editor and IDE integrations.Currently some populate integrations mark
for_each
in aprovider
block as an error, which is likely to discourage its use. Since the current integrations were created for this project's predecessor rather than for OpenTofu, a current workaround is to put theprovider
block in a.tofu
file instead of a.tf
file so that an OpenTofu-unaware integration won't check it for errors at all, which is far from ideal but perhaps less distracting than a spurious error. (Support for providerfor_each
opentofu-ls#9) -
Make the provider instance key handling convert to
cty.String
rather than requirecty.String
, for consistency with how instance key lookups work elsewhere in the language. (Provider instance keys not automatically converted to string #2378) -
Fix some little naming inconsistencies in the state snapshot read/write code, as discussed in a comment on the main PR. (Inconsistent field naming in
package statefile
after providerfor_each
implementation #2379) -
Allow provider for_each to refer to data resources, child module output values, etc #2155
-
Address some of the naming confusion that came from earlier work, as discussed in a comment on the main PR. (Inconsistent field naming in
package statefile
after providerfor_each
implementation #2379)
Activity