EC2 Linux - multiple reboots in user_data

I have a set of configuration and installation steps that requires multiple reboots intersperse in the user_data.

Is there a best practice approach to do that or should I look at pairing Terraform with Ansible for such use cases.

Cheers

Hi @nyue

Welcome back to the forums.

I would prefer to use Ansible for instance SW configuration as it could change more often than the infrastructure (that I will definitely keep managing with Terraform)

Provisioners are a Last Resort see: