Ok so I am totally new to
devops! I am an experienced developer, but at my new job I have been tasked to automate CI/CD. Non-existing so far. Only CI with Travis.
So the ideal workflow is: Push to CI -> build -> if successful provision an EC2 instance -> run integration tests
Our ideal architecture is to use
terraform for provisioning and
ansible for automation/config management. Scenarios down the road foresee continuous deployment and more stuff. So I need to get the basic building blocks right. This workflow seems like a good start.
I've searched for tutorials all day and, being beginner, I am totally confused.
As the goal is to fully automate the process, I am naively assuming that the ansible playbook would call a terraform provisioning role/task, and then continue by running all the steps for the integration tests.
But all I have found says to always run
terraform init first and then
terraform apply before switching to run a playbook, which seems cumbersome and not that "automated".
Can someone point me to a good resource describing how I can setup my desired workflow? Am I understanding things wrong?