When we use deck sync with multiple yaml files for different workspaces, we might see the following error
deck sync -s file1.yaml -s file2.yaml
Error: building state: inserting service SERVICE_NAME: entity already existsNote: current versions of decK no longer surface this as an ambiguous “entity already exists” error. Instead, decK fails fast with an explicit, self-explanatory error message naming both conflicting workspaces directly.
or all objects are being created in the same workspace (workspace of the first yaml file)
deck sync -s file1.yaml -s file2.yaml
creating workspace workspace1
creating service Service1
creating service Service2
Summary:
Created: 2
Updated: 0
Deleted: 0The reason for the error is that the sync operation isn’t able to operate on multiple workspaces, and we need to run deck separately for each workspace.