-
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
Feature: Ability to write custom checks #16848
Comments
Ah, some more digging turned up a similar request in #15469 with a hacky workaround. Unfortunately the workaround doesn't work if someone is using |
Hi @fishpen0! Indeed this seems to be the same as #15469, which is something we're still planning to look at but not able to work on in the short term due to some more fundamental architectural work going on right now. That point about Since we already have an issue for this, I'm going to close this one just to consolidate discussion over there. We don't recommend everyday use of |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Terraform for the most part bombs out when it should, but I would like a handler for creating custom checks unique to my environment. Users and extensions would be responsible for creating their own data sources or variables, this block would simply be a place to do basic logic and provide cli output. Checks would run after "refreshing state"/"plan", but before "apply" so all variables and data items are available, but no changes have been applied.
Some example scenarios where this would be useful:
Example structures:
Error
This will cause terraform to exit before making changes and print the response
Warning with wait for reply, including and an example of using a data source in the check
This will ask the user a y/n question and continue on a 'y' and exit on an 'n'
Warning with continue
This will simply print the response text as a warning at the beginning/end of a tf plan/apply
The text was updated successfully, but these errors were encountered: