Terraform provisioner: local-exec

From wikieduonline
Revision as of 08:47, 31 March 2023 by Brave (talk | contribs) (→‎See also)
Jump to navigation Jump to search


provisioner "local-exec" {
   command = "echo your_text_goes_here"
}
  provisioner "local-exec" {
   command = "mysql --host=${self.address} --port=${self.port} --user=${self.username} --password=${self.password} < ./schema.sql"
   }
 }


 resource "aws_instance" "your_web" {
  # ...

  provisioner "local-exec" {
    command = "echo The server's IP address is ${self.private_ip}"
  }
}

Related

See also

Advertising: