We would like to manage/publish our services on different environments with service definition files (SD files). However, I realised that it is not possible to overwrite an existing service with registered data by using an SD file (screenshot 1).
It is of course possible to delete the service and republish it. However, republishing the service like this changes the itemID of the corresponding portal-item. An existing web map which consumes this service will still work (probably because the rest-url of the service is still the same), but the newly published item can no longer be called in the overview page of the web map item, because the link still contains the old itemID (screenshot 2). This can be fixed by changing the ItemID of the service in the JSON configuration file of the web map item on the portal server. However, this workaround cannot be the proper solution.
Is there really no way to overwrite a service with registered data using an SD file without changing the ID of the corresponding portal item?
product-version: ArcGIS Enterprise 10.8.1
Screenshot 1:
Screenshot 2: