php - Unrecognized or unpermitted key(s) in configuration "beta_settings"

I deployed a Laravel application to Google App Engine(Flexible environment) and get errors.
Beginning deployment of service [default]...
#============================================================#
#= Uploading 4 files to Google Cloud Storage =#
#============================================================#
File upload done.
ERROR: (gcloud.beta.app.deploy) INVALID_ARGUMENT: Unrecognized or unpermitted key(s) in configuration "beta_settings"
- '@type': type.googleapis.com/google.rpc.BadRequest
fieldViolations:
- description: Unrecognized beta_setting key
field: no-cache
I wrote app.yaml with reference to this document
runtime: php
env: flex
runtime_config:
document_root: public
beta_settings:
cloud_sql_instances: "YOUR_CLOUDSQL_CONNECTION_NAME"
resources:
cpu: 1
memory_gb: 0.5
env_variables:
APP_LOG: errorlog
# etc.
Why is it unrecognized or unpermitted, "beta_settings" ?
Answer
Solution:
The error message mentions theno-cache
field, which is sometimes supplied as a CLI flag to thegcloud app deploy
command.
gcloud app deploy app.yaml --no-cache
From what I understand about the difference between GAE Standard and Flex, it is only available on the App Engine's Standard environment. It is likely that the flag is implicitly passed to the instance's config under thebeta_settings
section by the CLI tool.
I would assume that you've used this flag while debugging the Standard environment app before switching to Flex, or simply picked it up from the documentation. In that case, simply removing the flag from the CLI command should resolve your issue.
Answer
Solution:
[RESOLVED]
I use commandgcloud app deploy
instead ofgcloud beta app deploy
.
Answer
Solution:
Make sure that your Cloud SQL connection name under beta_settings does not have any reference to TCP since it should be in the format provided at the bottom of the Tutorial:"project:region:cloudsql-instance"
You are able to copy this string directly from your Cloud SQL instance’s dashboard to avoid any errors.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to a member function format() on string
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.