How to get user_data log


It’s possible do get log of user_data scripts in console or output terraform?

By the time user_data runs, terraform’s run is long done and gone so there is no way to pull the contents of the logs with same terraform script. There are tools like the AWS CLI and I believe cloud-init that can retrieve the user-data logs from console but you would need to implement those after terraform (they can be in the same pipeline if you like).

1 Like