How to run/execute a program from Terraform

If you need to run a local application from your Terraform scripts, you can call out to the provisioner local-exec and issue the command syntax:

resource "null_resource" "dig-aoms" { provisioner "local-exec" { # define your command below # this can be any application available in your terminal/commandline, # along with arguments command = "dig any ao.ms" } }
Code language: PHP (php)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments