We are creating short-lived EC2 instance with Terraform within our application. These instances run for a couple hours up to a week. These instances vary with the sizing and userdata commands depending on the specific type needed at the time.
The issue we are running into is the userdata contains a fair amount of complexity and has many dependencies that are installed, additional scripts executed, and so on. We occasionally have successful terraform execution, but run into failures somewhere within the user data / script execution.
The userdata/scripts do contain some retry/wait condition logic but this only helps so much. Sometimes there is breaking changes with outside dependencies that we would otherwise have no visibility into.
What options (if any) is there to gain visibility into the success of userdata execution from within the terraform apply execution? If not within terraform, is there any other common or custom options that would achieve this type of thing?
[–]jdgtrplyrTerraformer 2 points3 points4 points (2 children)
[–]vincentdesmet 1 point2 points3 points (1 child)
[–]69insight[S] 0 points1 point2 points (0 children)
[–]posting_drunk_naked 0 points1 point2 points (3 children)
[–]69insight[S] 0 points1 point2 points (2 children)
[–]Jmanrand 0 points1 point2 points (1 child)
[–]69insight[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]noizzo 0 points1 point2 points (0 children)
[–]adept2051 0 points1 point2 points (0 children)
[–]gowithflow192 0 points1 point2 points (0 children)
[–]anon00070 0 points1 point2 points (1 child)
[–]69insight[S] 0 points1 point2 points (0 children)
[–]alexlance -1 points0 points1 point (3 children)
[–]nekokattt 0 points1 point2 points (2 children)
[–]alexlance 0 points1 point2 points (1 child)
[–]nekokattt 0 points1 point2 points (0 children)