I’m rather new to Terraform, so this question might be very misguided. Apologies, if so.
I want to use Terraform Cloud to manage my infrastructure and deploys. The flow I’m imagining is something like this:
- I push code to a remote repo (in my case, GitHub)
- This triggers a build of a Docker image (in my case, with Google Cloud Build)
- Terraform Cloud plans my infrastructure, with the Docker images from step 2.
- Terraform Cloud provisions my infrastructure (in my case, Google Cloud Run)
The issue is that I can’t find a nice way to trigger a Docker image build with Terraform. I can get code pushes to trigger a Terraform Cloud plan, but at this point I don’t have the Docker images I need. This makes me think I’m doing something in a strange way, but I can’t figure out what the correct way is.
Any pointers here are much appreciated.