How can I start a remote service using Terraform provisioning?
问题 I want my Terraform config to provision a server and start the service at the end by invoking a command and keep running it. I tried using nohup and screen using remote-exec: nohup: provisioner "remote-exec" { inline = "nohup sudo command &" } screen: provisioner "remote-exec" { inline = "screen -d -m sudo command" } I check if the commands are running by logging in manually. But they do not keep a process running. These commands do work if I try them manually and invoking them with ssh also