Skip to content

Conversation

@SBGoods
Copy link
Contributor

@SBGoods SBGoods commented Oct 14, 2025

Description

Adds a PostApplyFunc test step hook for plan/apply testing. This hook will run after the config is applied and after plan/apply test checks are run. This is useful for testing values that are not stored in Terraform state or testing Terraform Actions.

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.
N/A

@SBGoods SBGoods added this to the v1.14.0 milestone Oct 14, 2025
@SBGoods SBGoods requested a review from a team as a code owner October 14, 2025 20:20
@SBGoods SBGoods added the enhancement New feature or request label Oct 14, 2025
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment to consider!


// PostApplyFunc is called after the Config is applied and after all plan/apply checks are run.
// This can be used to perform assertions against API values that are not stored in Terraform state.
PostApplyFunc func()
Copy link
Member

Choose a reason for hiding this comment

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

I don't have a specific qualm about the signature, but if you haven't already, might be worth confirming with interested provider developers if there is anything they'd expect to be in a request/response, since we can't add anything without a breaking change. For example, some of these hooks have error returns for the test framework to handle, do they need any more context/data in the request, etc.

@SBGoods SBGoods merged commit ee23b9f into main Oct 17, 2025
44 checks passed
@SBGoods SBGoods deleted the SBGoods/post-action-func branch October 17, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants