Skip to content

Conversation

@mildwonkey
Copy link
Contributor

@mildwonkey mildwonkey commented Jul 11, 2025

Adding ActionInvocations to the planfile

Part of TF-27252 (internal): adding ActionInvocations to planfile and stopping just short of the rendering (which got moved to a different ticket).

I was making up the types as I go, and while most areas support LinkedResources I ignored them in the jsonplan package, so some random notes on TBD future work -

  • sensitive values in the ResourceInstanceActionChange??
  • for that matter I expect that the entire ResourceInstanceActionChange type will change, I was making it up
  • we're still not properly tracking the action trigger index, but that's not relevant for generic actions so I tried not to worry about it

Still gated behind the alpha gate, so this should not have any user-facing impact.

Fixes #

Target Release

1.14

1.14.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@mildwonkey mildwonkey added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Jul 11, 2025
@mildwonkey mildwonkey force-pushed the mildwonkey/action-plan-file branch from 6c35cd9 to fb0ab7a Compare July 16, 2025 15:04
@mildwonkey mildwonkey changed the title WIP: Actions in plan/changes Actions in plan/changes Jul 16, 2025
)

type ActionInvocation struct {
// Address is the absolute action address
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will need the address of the triggering resource, the trigger block index and the index for the event here to clearly link the action invocation back to its place in the config and to be able to base apply on it. I think we could get if it's run before or after from this info as well by looking at the config so we don't necessarily need it in the plan.

That being said, we can either add these now or in a follow up PR that integrates this with the plan action changes. The heavy lifting is done so I'm also ok with folding this into the upcoming work 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, agreed - I didn't do it here because I'd have to rework the hooks too, and also I didn't have a good picture of when or where we would build that info

@mildwonkey mildwonkey merged commit 9256074 into main Jul 17, 2025
8 checks passed
@mildwonkey mildwonkey deleted the mildwonkey/action-plan-file branch July 17, 2025 12:19
@github-actions
Copy link
Contributor

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog-needed Add this to your PR if the change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants