Coder.comC
Coder.comโ€ข2y agoโ€ข
3 replies
Paul

Run a command before workspace is deployed/build

Hello Community, I've a problem right now...

I have a dedicated Server that i want to wake up before a Template is planned/applied.
I've already implemented a "wakeup" skript with REST API calls to my Server.

Now I fencing some problems. My first try was to use Terraform to send my REST API calls.
But sadly this does not work, some providers that I use (in my template) require some connection to my Server (in the Plan section). So I can't wakeup my Server with REST API calls before the other Provider needs to call my server.
(For details I use a Proxmox Provider, not the best one but it works :D)

I hope you understand this problem until yet.

So my last idea is to call a Script (simple curl commands) BEFORE Coder uses "terraform plan & terraform apply" internally.
Is there some kind of Pre-Plan Hooks implemented right now?

I wish there is a solution that I can call a script (and wait until its finished) before terraform is beeing used.

I hope someone can help me ๐Ÿ™‚
Pls. my english writing is not so good, I'm a german.
Was this page helpful?