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

Cloud Run support #3421

Closed
quinn opened this issue Apr 11, 2019 · 15 comments
Closed

Cloud Run support #3421

quinn opened this issue Apr 11, 2019 · 15 comments

Comments

@quinn
Copy link

quinn commented Apr 11, 2019

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 the 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 the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

Is there a plan to implement GCP's new "cloud run" functionality?

New or Affected Resource(s)

  • google_cloud_run

Potential Terraform Configuration

# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.
resource "google_cloud_run" "example" {
  container    = "us.gcr.io/project/service@sha256:fff"
  service_name = "some-service"
}
@ghost ghost added the enhancement label Apr 11, 2019
@quinn
Copy link
Author

quinn commented Apr 11, 2019

also: i would be happy to attempt implementing this

@emilymye
Copy link
Contributor

we are always open to community contributions! as a side note, we generally are trying to develop new resources via our autogeneration repo, https://github.com/GoogleCloudPlatform/magic-modules

@quinn
Copy link
Author

quinn commented Apr 13, 2019

@emilymye thank you! started working on PR here: GoogleCloudPlatform/magic-modules#1643

@quinn
Copy link
Author

quinn commented Apr 16, 2019

@emilymye I'm currently stuck on the API calls to the Cloud Run REST API. they are all returning 400, even simple GET/list operations. Googling did not yield anything helpful. I even tried setting the default region for my project. Here's the comment: GoogleCloudPlatform/magic-modules#1643 (comment) any thoughts on this, or where i can go for help with this?

@chrisst chrisst self-assigned this May 7, 2019
@chrisst
Copy link
Contributor

chrisst commented May 7, 2019

@quinn My understanding is that the namespaces.* endpoints listed are a side effect of the object model that CloudRun is built on and they are not actually valid or updatable resources. The projects.locations.* endpoints should have the real resources. I have been told there is work in progress to get those removed from the docs.

That being said the locations.services object is unfortunately much more complex than the namespaces one. Thank you for tackling this, but we've been building tools to generate the api definition from complex upstream discovery docs so I can take this over from here.

@quinn
Copy link
Author

quinn commented May 7, 2019

@chrisst thanks for the update ! looking forward to this being available

@jaredswinney
Copy link

What is the current ETA/current progress on this module? Thoroughly looking forward to integrating with this! @chrisst

@bmorphism
Copy link

I've implemented this locally. Happy to help whoever is working on PR for this.

@chrisst
Copy link
Contributor

chrisst commented May 24, 2019

Quick update on this. I've been talking with the Cloud Run team and have found that while the Cloud Run product is in beta our support of it would required using alpha KNative apis. Part of the proposal for the KNative v1beta1 is an overhaul of the object structure that the API will accept, for more details check out KNative's latest release which explains the beta proposal.

We do not want to release a Terraform resource that will have to change within months of its release or one that relies on alpha apis that are still stabilizing. Additionally we strive to not introduce intentional breaking changes to our beta provider. So we have decided to wait until the API hits v1beta1 before releasing official support for Cloud Run. This should be happening soon, but feel free to track https://github.com/knative/serving for more precision.

The code in the linked PR is currently functional and tested against the alpha APIs so those who are interested are welcome to pull it locally and use it to prototype or build against. Once v1beta1 is available I'll be updating the resource but hopefully it will remain very similar.

@sheepsteak
Copy link

@chrisst, is the new 0.7.0 release of KNative/serving the one we've been waiting for? It looks like v1beta1 APIs are present now 😄

https://github.com/knative/serving/releases/tag/v0.7.0

@chrisst
Copy link
Contributor

chrisst commented Jul 2, 2019

@sheepsteak yup that's the one! Once the Cloud Run API's migrate to the v1beta1 Knative APIs then we'll be able to launch Terraform support.

@chrisst
Copy link
Contributor

chrisst commented Jul 26, 2019

The cloudrun REST API hasn't been released at v1beta1 yet, however they have updated the v1alpha1 endpoints to accept and respond with the beta object models. I've updated our mappings to use those so it looks and feels "beta-y" even though it's using alpha endpoints under the hood. I don't have an estimate for when the beta endpoints will ship but I've been told the models shouldn't be changing between now and then.
Given the above I'm planning on shipping the Terraform support for this in the next release and I'm calling it a "betpha" so use with good judgement. We will update the resource when the beta apis ship.

@mbrancato
Copy link

With the initial release of google_cloud_run_service resource type, there seems to be a few things still missing and I'm wondering if this is a Terraform module limit or API limit. Two I've hit are assigning service account and IAM roles. Am I just missing something here?

@rileykarson
Copy link
Collaborator

Since this is supported (it isn't documented on our sidebar- fixing that with GoogleCloudPlatform/magic-modules#2263), I'm closing this issue out. #4262 can cover the features @mbrancato raised that it appears we're missing.

@ghost
Copy link

ghost commented Sep 28, 2019

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 Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants