Move kong resources from default workspace to other workspace

Is there a “deck” way of moving resources service/routes from default workspace to other workspace in kong enterprise ?

Hi,

You should be able to:
deck dump --workspace default
deck sync --workspace <new_workspace>

If you only want to move a subset, you can tag the services/routes/plugins you want to move in the default workspace and then:
deck dump --workspace default --select-tag tag
deck sync --workspace <new_workspace> --select-tag tag

Hope this helps,

Fel.

Thanks Fel for reply.
I tried to do that but I am seeing few errors in route creation. I don’t feel lift and shift happening on kong resources between workspaces. As per the logs it is trying to create new kong resources in new workspace instead of moving them and that makes sense why routes are errored out in creation, as they might be rejected by kong router with a matched route in default workspace.

Logs after applying ‘deck sync --workspace test-sp’ command

creating service testadminapi
creating service echo-k8s
creating acl-group 81f7ad3a-80cf-4baa-88f2-4746dfeb4e95 for consumer 5ca4101d-03c2-47de-a9ed-6df1d09b40f4
creating route api-test
creating route e0eb7bd3-04e6-4214-b303-d9fbfaf9b3da
creating route 5a626d65-3132-4bcf-8e70-b2b1b5e76caa
creating route e13d11c0-5b71-4a14-93c6-6f4b15af425d
creating route 24c4dbb2-331c-4347-8003-2b8fd0c2de14
creating route 81f7ad3a-80cf-4baa-88f2-4746dfeb4e95
creating route api
Summary:
Created: 11
Updated: 0
Deleted: 0
Error: 7 errors occurred:
while processing event: {Create} route 81f7ad3a-80cf-4baa-88f2-4746dfeb4e95 failed: HTTP status 409 (message: “API route collides with an existing API”)
while processing event: {Create} route 5a626d65-3132-4bcf-8e70-b2b1b5e76caa failed: HTTP status 409 (message: “API route collides with an existing API”)
while processing event: {Create} route api-test failed: HTTP status 409 (message: “API route collides with an existing API”)
while processing event: {Create} route e0eb7bd3-04e6-4214-b303-d9fbfaf9b3da failed: HTTP status 409 (message: “API route collides with an existing API”)