GCP Api Gateway is it possible to update the code of a config file or do I need to create a brand new config every time?

Viewed 202

I'm trying to set up API Gateway to work with a GCP Function that I have running.

I previously created a config using the following code in terminal:

gcloud api-gateway api-configs create apigateway-gcpfunction-config \
  --api=my-api --openapi-spec=apigateway_gcpfunction_config.yaml \
  --project=my-project --backend-auth-service-account=my-service-account@blah.com

This works correctly, and when I view my config using the following code I get a notification that it's active:

gcloud api-gateway api-configs describe apigateway-gcpfunction-config --api=my-api --project=my-project

However now I'm trying to update my config file because I needed to change the path for my GCP Function, but I can't find anything in the documentation for how to update the code.

I see in this article detailing updating api-configs that it's possible to update various attributes of a config, but I can't figure out how to update the code itself? Is this impossible? Should I just create a new config every time and relaunch a new gateway with a new config every time there's an update to the config file????

1 Answers

According to this documentation on updating an API config:

You cannot modify an existing API config other than to update its labels and its display name.

It is also stated in the documentation that you provided under Description:

NOTE: Only the name and labels may be updated on an API config.

As of the moment, we could only create a new API config if we want to update our config file.

We could file for a feature request for this option to be available in the future.

Related