Open pedrosdf opened 9 months ago
@pedrosdf can you share the debug log for your tf apply
?
@edwardmedia Actual app.yaml taken from here:
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
operating_system: ubuntu22
# This sample incurs costs to run on the App Engine flexible environment.
# The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
Terraform version: terraform -v Terraform v1.6.5 on darwin_arm64
debug log: clean debug.log
[31mâ•·[0m[0m
[31m│[0m [0m[1m[31mError: [0m[0m[1mError waiting to create FlexibleAppVersion: Error waiting for Creating FlexibleAppVersion: Error code 9, message: An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2024-01-15T23:48:44.284Z210369.jc.0: /bin/sh: 1: exec: gunicorn: not found
[31m│[0m [0m[0m
[31m│[0m [0m
[31m│[0m [0m[0m with google_app_engine_flexible_app_version.app-engine-service-flexible,
[31m│[0m [0m on app_engine.tf line 32, in resource "google_app_engine_flexible_app_version" "app-engine-service-flexible":
[31m│[0m [0m 32: resource "google_app_engine_flexible_app_version" "app-engine-service-flexible" [4m{[0m[0m
[31m│[0m [0m
[31m╵[0m[0m
@oaa97181 it appears the api does not take your config. Are you able to deploy the app with gcloud?
An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_health
@edwardmedia yes, with gcloud app deploy
@oaa97181 can you share the gcloud command that deploys the app? and share its debug log (appending --log-http in the command) as well.
To be clear, when you deployed the app via Terraform config, it works for python v3.6, but not for v3.7? Assuming everything else remains unchanged?
Below is the content of requirements.txt you provided by the link. What versions were they in your cases? Besides, where did you specify the py version?
Flask==3.0.0; python_version > '3.6'
Flask==2.3.3; python_version < '3.7'
Werkzeug==3.0.1; python_version > '3.6'
Werkzeug==2.3.7; python_version < '3.7'
gunicorn==20.1.0
@edwardmedia attaching the log file gloud deploy log.txt
it did not deploy when trying with terraforms google_app_engine_flexible_app_version.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Description
User is unable to deploy a new Google App-engine flexible instance with python version 3.7 using terraform and gets /readiness_check failReason:"null" error.
Affected Resource(s)
google_app_engine_flexible_app_version
Terraform Configuration Files
Additional information
this is the app.yaml file: App Engine Module/Version:
Include app.yaml:
included_files:
requirements.txt
main.py
runtime_config:
python_version: 3.7
runtime: python
env: flex
entrypoint: 'pwd && ls && python -m pip install -r ./hello_world/requirements.txt && gunicorn -b :$PORT main:app'
b/320650947