Let's suppose I make a change over one variable in a Key-Value engine in my Hashicorp Vault.
Once I apply the change, it will create a new version of my variable, as expected.
Can I, somehow, send an API call or at least run a command coming from Hashicorp Vault itself? What I want to achieve is that, when I change a variable inside Hashicorp Vault, I can trigger a CICD build inside Gitlab CI.
No, Hashicorp Vault itself does not have any event/callback or similar mechanism for when secrets are updated.
However, depending on what storage backend you are using, you may be able to use features of your backend to support this. To give a few examples:
Other backends will have their own mechanisms for this. However, not all backends will support this directly.
If you don't have a backend that supports this, your next best bet would be to periodically poll and check for updated values. For example, you might use scheduled pipelines to do this.