Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_app_engine_standard_app_version fails if "entrypoint" parameter is not defined #7812

Closed
minherz opened this issue Nov 14, 2020 · 4 comments · Fixed by GoogleCloudPlatform/magic-modules#5318, hashicorp/terraform-provider-google-beta#3784 or #10425
Assignees
Milestone

Comments

@minherz
Copy link

minherz commented Nov 14, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the 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 to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v0.13.5

  • provider registry.terraform.io/hashicorp/archive v2.0.0
  • provider registry.terraform.io/hashicorp/external v2.0.0
  • provider registry.terraform.io/hashicorp/google v3.47.0
  • provider registry.terraform.io/hashicorp/random v2.3.1
  • provider registry.terraform.io/hashicorp/template v2.2.0

Affected Resource(s)

  • google_app_engine_standard_app_version

Terraform Configuration Files

# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.
# For security, you can also encrypt the files using our GPG public key:
#    https://www.hashicorp.com/security
#
# If reproducing the bug involves modifying the config file (e.g., apply a config,
# change a value, apply the config again, see the bug), then please include both:
# * the version of the config before the change, and
# * the version of the config after the change.

Debug Output

2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 2020/11/14 20:27:12 [DEBUG] Google API Request Details:
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: ---[ REQUEST ]---------------------------------------
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: POST /v1/apps/my_project_id/services/my_service/versions?alt=json HTTP/1.1
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Host: appengine.googleapis.com
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: User-Agent: Terraform/0.13.5 (+https://www.terraform.io) Terraform-Plugin-SDK/2.1.0 terraform-provider-google/3.47.0
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Content-Length: 606
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Content-Type: application/json
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Accept-Encoding: gzip
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: {
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "basicScaling": {
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "idleTimeout": "600s",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "maxInstances": 10
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  },
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "deployment": {
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "zip": {
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:    "sourceUrl": "https://storage.googleapis.com/my_project_id-rating-deployables/my_service.zip"
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   }
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  },
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "envVariables": {
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "DB_HOST": "/cloudsql/my_project_id:us-east1:instance",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "DB_NAME": "db",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "DB_PASSWORD": "password",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "DB_USERNAME": "user",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "MAX_DB_CONNECTIONS": "10"
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  },
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "handlers": [
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   {
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:    "authFailAction": "AUTH_FAIL_ACTION_REDIRECT",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:    "login": "LOGIN_OPTIONAL",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:    "script": {
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:     "scriptPath": "auto"
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:    },
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:    "securityLevel": "SECURE_OPTIONAL",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:    "urlRegex": ".*"
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   }
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  ],
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "id": "prod",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "inboundServices": [],
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "instanceClass": "B2",
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:  "runtime": "python38"
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: }
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:12.596+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: -----------------------------------------------------
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 2020/11/14 20:27:13 [DEBUG] Google API Response Details:
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: ---[ RESPONSE ]--------------------------------------
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: HTTP/1.1 400 Bad Request
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Connection: close
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Transfer-Encoding: chunked
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Alt-Svc: h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Cache-Control: private
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Content-Type: application/json; charset=UTF-8
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Date: Sat, 14 Nov 2020 18:27:13 GMT
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Server: ESF
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Vary: Origin
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Vary: X-Origin
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Vary: Referer
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: X-Content-Type-Options: nosniff
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: X-Frame-Options: SAMEORIGIN
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: X-Xss-Protection: 0
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: fc
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: {
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "error": {
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:     "code": 400,
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:     "message": "Please update to the latest version of gcloud. If you are using the API directly, please provide a value for version.entrypoint.shell. This can be an empty value.",
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:     "status": "INVALID_ARGUMENT"
2020-11-14T20:27:13.593+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   }
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: }
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 0
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: -----------------------------------------------------
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 2020/11/14 20:27:13 [DEBUG] Retry Transport: Stopping retries, last request failed with non-retryable error: googleapi: got HTTP response code 400 with body: HTTP/1.1 400 Bad Request
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Connection: close
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Transfer-Encoding: chunked
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Alt-Svc: h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Cache-Control: private
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Content-Type: application/json; charset=UTF-8
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Date: Sat, 14 Nov 2020 18:27:13 GMT
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Server: ESF
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Vary: Origin
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Vary: X-Origin
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: Vary: Referer
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: X-Content-Type-Options: nosniff
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: X-Frame-Options: SAMEORIGIN
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: X-Xss-Protection: 0
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: fc
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: {
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   "error": {
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:     "code": 400,
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:     "message": "Please update to the latest version of gcloud. If you are using the API directly, please provide a value for version.entrypoint.shell. This can be an empty value.",
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:     "status": "INVALID_ARGUMENT"
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5:   }
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: }
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 0
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 2020/11/14 20:27:13 [DEBUG] Retry Transport: Returning after 1 attempts
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 2020/11/14 20:27:13 [DEBUG] Unlocking "apps/my_project_id"
2020-11-14T20:27:13.594+0200 [DEBUG] plugin.terraform-provider-google_v3.47.0_x5: 2020/11/14 20:27:13 [DEBUG] Unlocked "apps/my_project_id"
2020/11/14 20:27:13 [DEBUG] google_app_engine_standard_app_version.my_service: apply errored, but we're indicating that via the Error pointer rather than returning it: Error updating StandardAppVersion "apps/my_project_id/services/my_service/versions/prod": googleapi: Error 400: Please update to the latest version of gcloud. If you are using the API directly, please provide a value for version.entrypoint.shell. This can be an empty value.
2020/11/14 20:27:13 [ERROR] eval: *terraform.EvalApplyPost, err: Error updating StandardAppVersion "apps/my_project_id/services/my_service/versions/prod": googleapi: Error 400: Please update to the latest version of gcloud. If you are using the API directly, please provide a value for version.entrypoint.shell. This can be an empty value.
2020/11/14 20:27:13 [ERROR] eval: *terraform.EvalSequence, err: Error updating StandardAppVersion "apps/my_project_id/services/my_service/versions/prod": googleapi: Error 400: Please update to the latest version of gcloud. If you are using the API directly, please provide a value for version.entrypoint.shell. This can be an empty value.

Error: Error updating StandardAppVersion "apps/my_project_id/services/my_service/versions/prod": googleapi: Error 400: Please update to the latest version of gcloud. If you are using the API directly, please provide a value for version.entrypoint.shell. This can be an empty value.

Panic Output

Expected Behavior

The documentation states that entrypoint parameter is optional. If it is not defined, the provisioning should still succeed.

Actual Behavior

I received the error which disappears if I provide entrypoint parameter.

Steps to Reproduce

  1. Create GCP project
  2. Take an example of the google_app_engine_standard_app_version from the document and remove entrypoint. Make sure that there is .zip with any valid content.
  3. terraform apply

Important Factoids

I also tried to provide an empty string for the entrypoint:

entrypoint {
  shell = ""
}

I've got the same error.

References

  • #0000
@ghost ghost added the bug label Nov 14, 2020
@edwardmedia edwardmedia self-assigned this Nov 15, 2020
@edwardmedia
Copy link
Contributor

It appears the entrypoint should have been a required field.

@minherz
Copy link
Author

minherz commented Nov 16, 2020

Is there a way to define it as a bug in the documentation?

@rileykarson
Copy link
Collaborator

We could label the issue documentation, but this is a schema issue too.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2021
@github-actions github-actions bot added forward/review In review; remove label to forward service/appengine labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.