Search code examples
google-cloud-platformterraform-provider-gcpgoogle-workflows

Cloud Workflows vs Cloud Build for buinding infrastructure?


Since now, I've used Cloud Build as a vanilla CICD for running terraform and for building the infrastructure (sometimes I've Docker containers to build, sometimes I've not).

Now that Cloud Workflows is available I was wondering if this could be a better tool for pipelining atomic steps execution, for easiness and better control (for ex. conditional executions, error handling and so on, centralized log pushing and so)

I think that everything of the aboves can be done in Cloud Build, but it's usually not trivial to do.

Is Workflows ok for that and, if not, which is the best use case of this new tool instead?


Solution

  • You can have similarities, if, for example, your Cloud Build only call APIs to run/deploy/configure stuff.

    However, keep in mind 2 things:

    • Cloud Workflow can only call APIs and sleep. You can't build a container image (with Docker for example) with Workflow. it's not a runtime environment, just a stuff which call APIs
    • Cloud Build can be trigger on push, tag and pull request. You can't do that with Workflow.

    So, yes, sometime you can ask yourselves if you can change one by the other, but personally, I think that you have to use the right product for the right job.

    • API call orchestration -> Workflow
    • CICD -> Cloud Build