Here’s how to add userdata in Terraform.

<pre lang="bash">
user_data = filebase64("${path.module}/example.sh")