Skip to content

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)

See also  How to fix the Terraform stuck on "Refreshing state…" problem
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x