CI/CD in gcp cloud run causes clashes

I am using a bunch of google cloud run services in a project.
Each of them requires a bunch of configurations (memory, env variables, etc.)
I’ve decided that the way to handle will be for each of the services repository, create a pipeline that will build the docker image and run terraform apply with that docker image, push it to a registry and run terraform plan with the image url as an input variable, with each service having it’s own infrastructure directory with two terraform modules, one for cloud run and one for cloud scheduler.
I found that upon launching the second service, it removed the previously deployed one and replaced it with the new one, instead of launching a service alltogether.
I tried renaming the module names to see if the terraform state can then recognize them as different modules and it still gets overridden.
I am using a google cloud storage bucket as the backend.
Should I use a different backend for each service?
Should I instead have a terraform monorepo for all the services and introduce the image names manually while leaving each service repo only responsible to handle building and pushing the image?
Is there another approach I should try?
Thanks in advance

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.