I was trying to delete a config file from the google api gateway service from the UI and also from the command line. But they are saying target config file is in use but I couldn't find it anywhere neither in UI nor in the result of gcloud command for list of api gateways. Now it is not letting me create it so my process is failing for no reason.
See the below picture. It is giving the following error while trying to delete config. But there is no such gateways which are using this config.
Any idea what might go wrong for my case?
Asked
Active
Viewed 651 times
2

xalien
- 123
- 1
- 8
-
What do you exactly mean with "Now it is not letting me create it so my process is failing for no reason"? – xBurnsed Oct 21 '21 at 15:56
-
I meant that now I can not delete api gateway because it is not found(neither in UI nor in console). And as the config is depending on that gateway(actually the ghost) so I can not delete that api config. I want to delete that api gateway config and create it again with a new api specs. – xalien Oct 22 '21 at 19:00
1 Answers
2
According to this, you have first to create a new config file for your gateway or delete the gateway itself before being able to delete the existing config file in use.
Once you complete one of the options above, you should be able to delete your config file with:
gcloud api-gateway api-configs delete YOUR_CONFIG_ID --api=YOUR_API_ID --project=YOUR_PROJECT_ID

xBurnsed
- 410
- 4
- 12
-
Yes, I agree with you. But the problem is there is a gateway config which I can not delete in anyways because it is saying some gateways are using it. But the fact is there is no such gateway that is using this gateway config. – xalien Oct 26 '21 at 08:42
-
1Could you please run [this command](https://cloud.google.com/sdk/gcloud/reference/beta/api-gateway/api-configs/delete) in your Cloud Shell with the [`--verbosity`](https://cloud.google.com/sdk/gcloud/reference#--verbosity) debug flag? This will provide more information on the underlaying issue. – xBurnsed Oct 26 '21 at 10:05
-
For some reason which I don't know I was able to delete it from the UI. But I'll definitely try with the --verbosity flag – xalien Oct 27 '21 at 11:52
-
-
Actually it is kind of weird thing, first it was showing my api gateway config file is used by 9 api gateways within the same region(which actually doesn't exist) then after sometime it is saying 5 such gateways and in the next day I've seen no such gateways were there so it let me delete it. I'm kind of disappointed to this weird behaviour of api gateway service. @xBurnsed thank you for the heads up – xalien Oct 28 '21 at 07:10