-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
ephemeral resource deferrals #35793
ephemeral resource deferrals #35793
Conversation
5f97899
to
5f19dda
Compare
Another place to check is I wouldn't worry about exactly how that gets called right now (if we need it), all that dynamic expand code will get refactored to accommodate the ephemeral mode, since the current structure doesn't allow us to reuse the code during apply. |
5f19dda
to
0ed29f0
Compare
0ed29f0
to
673f160
Compare
673f160
to
5401544
Compare
5401544
to
ead492a
Compare
ead492a
to
f27ab09
Compare
f27ab09
to
c730a14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this look good! Any refactoring we need in the plan nodes will probably come up again as I work on apply, since it needs to use the same codepaths as planning for ephemeral values.
@@ -66,6 +67,19 @@ type Deferred struct { | |||
// all of those options to decide if each instance is relevant. | |||
resourceInstancesDeferred addrs.Map[addrs.ConfigResource, addrs.Map[addrs.AbsResourceInstance, *plans.DeferredResourceInstanceChange]] | |||
|
|||
// ephemeralResourceInstancesDeferred tracks the ephemeral resource instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to refactor now, but would it make sense to just track all these in resourceInstancesDeferred
? The address are all the same type and are differentiated by mode, but I don't know if it helps reduce code otherwise or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed this with @liamcervante and we think that since we serialize the other deferred changes into the plan, differentiating them by mode alone would put us at more risk of accidentally not accounting for ephemeral resources. The extra effort we need to put in now does not feel major to warrant that risk.
c730a14
to
916597c
Compare
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Target Release
1.10.x
Draft CHANGELOG entry
ENHANCEMENTS