Skip to content

fix: Improve error message for actions expanded with count/for_each in action_trigger - #37935

Open
devhindo wants to merge 3 commits into
hashicorp:mainfrom
devhindo:main
Open

fix: Improve error message for actions expanded with count/for_each in action_trigger#37935
devhindo wants to merge 3 commits into
hashicorp:mainfrom
devhindo:main

Conversation

@devhindo

@devhindo devhindo commented Nov 23, 2025

Copy link
Copy Markdown

fixes: #37927

This PR improves the error message displayed when an action referenced in an action_trigger block cannot be resolved to a specific instance.

Target Release

1.15.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.

@devhindo
devhindo requested a review from a team as a code owner November 23, 2025 20:28
@hashicorp-cla-app

hashicorp-cla-app Bot commented Nov 23, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Signed-off-by: devhindo <lildevhind@gmail.com>

@mildwonkey mildwonkey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for working on this @devhindo !

I only want to change the error message to this if we have reason to think that is the problem - for example, if the trigger references an action when it should have been an action instance. But this will also get returned if for e.g. the action isn't in the config at all, or there's a typo on the action name. If we can't make a reasonable guess, we should return the original (generic) error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

actions: improve error message when action needs to be referenced by instance

3 participants