To figure out how deployment manager behaves when we have same resource name in different deployment I did following steps:
- I create a deployment named dep-1 with single VM named vm1.
- Then I created a a deployment named dep-2 with same VM named vm1.
I was thinking that dep-2 will fail saying a resource already exist with same name but it succeeded without any warning/error.
Later when I deleted dep-2 it deleted the vm resource named vm-1.
Now I want to know how to deal with this behavior. Say I want to deploy my environment for dev, qa and prod. What is the best practice to do it in GCP deployment manager?