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_cloud_run_service return HTTP response 404 during creation #5420

Closed
nikrhes opened this issue Jan 16, 2020 · 5 comments
Closed

google_cloud_run_service return HTTP response 404 during creation #5420

nikrhes opened this issue Jan 16, 2020 · 5 comments
Assignees
Labels

Comments

@nikrhes
Copy link

nikrhes commented Jan 16, 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 version: v0.12.17
Google provider: v3.3.0

Affected Resource(s)

google_cloud_run_Service

Terraform Configuration Files

resource "google_project_service" "run" {
service = "run.googleapis.com"
}

resource "google_cloud_run_service" "my-service" {
name = "my-service"
location = var.region

template {
spec {
containers {
image = "gcr.io/cloudrun/hello"
}
}
}

traffic {
percent = 100
latest_revision = true
}

depends_on = [google_project_service.run]
}

resource "google_cloud_run_service_iam_member" "allUsers" {
service = google_cloud_run_service.my-service.name
location = google_cloud_run_service.my-service.location
role = "roles/run.invoker"
member = "allUsers"
}

Debug Output

debug.log

Panic Output

Expected Behavior

Cloud run service created

Actual Behavior

ERROR: Error creating Service: googleapi: got HTTP response code 404 with body:

<title>Error 404 (Not Found)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style>

404. That’s an error.

The requested URL /apis/serving.knative.dev/v1/namespaces/acn-ipc-connected-port/services was not found on this server. That’s all we know.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@ghost ghost added the bug label Jan 16, 2020
@edwardmedia edwardmedia self-assigned this Jan 16, 2020
@edwardmedia
Copy link
Contributor

@nikrhes I can't repro your issue. All three resources are successfully created by using your code. Can you post 1) tf plan 2) full debug log in order for me to take a closer look. Thanks

@nikrhes
Copy link
Author

nikrhes commented Jan 20, 2020

@edwardmedia thank you for reaching out. i Have updated my initial post with link to debug log. kindly check it.

My TF plan:

google_cloud_run_service.my-service will be created

  • resource "google_cloud_run_service" "my-service" {
    • id = (known after apply)

    • location = "asia-southeast1"

    • name = "my-service"

    • project = (known after apply)

    • status = (known after apply)

    • metadata {

      • annotations = (known after apply)
      • generation = (known after apply)
      • labels = (known after apply)
      • namespace = (known after apply)
      • resource_version = (known after apply)
      • self_link = (known after apply)
      • uid = (known after apply)
        }
    • template {

      • spec {
        • service_account_name = "[email protected]"

        • serving_state = (known after apply)

        • containers {

          • image = "gcr.io/cloudrun/hello"
            }
            }
            }
    • traffic {

      • latest_revision = true
      • percent = 100
        }
        }

google_cloud_run_service_iam_member.allUsers will be created

  • resource "google_cloud_run_service_iam_member" "allUsers" {
    • etag = (known after apply)
    • id = (known after apply)
    • location = "asia-southeast1"
    • member = "allUsers"
    • project = (known after apply)
    • role = "roles/run.invoker"
    • service = "my-service"
      }

@ghost ghost removed the waiting-response label Jan 20, 2020
@edwardmedia
Copy link
Contributor

edwardmedia commented Jan 22, 2020

@nikrhes the region you selected is asia-southeast1 where the Cloud Run has not been enabled. Below are the regions where Cloud Run is available

asia-northeast1 (Tokyo)
europe-west1 (Belgium)
us-central1 (Iowa)
us-east1 (South Carolina)
Dec 4, 2019

@edwardmedia
Copy link
Contributor

@nikrhes I am closing the issue now. If you want further assistance, please reopen the issue. Thanks

@ghost
Copy link

ghost commented Mar 28, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants