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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless: use Terraform resource for Cloud Run jobs #170

Open
mikouaj opened this issue Dec 30, 2022 · 2 comments
Open

Serverless: use Terraform resource for Cloud Run jobs #170

mikouaj opened this issue Dec 30, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@mikouaj
Copy link
Member

mikouaj commented Dec 30, 2022

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.

Description

Cloud Run jobs resource is finally available in Google Terraform provider!
The existing Terraform solution should be adapted to leverage the new CloudRun resource to create it without manual step.

References

@mikouaj mikouaj added the enhancement New feature or request label Dec 30, 2022
@iBasit
Copy link

iBasit commented Jan 6, 2023

+1

@mikouaj
Copy link
Member Author

mikouaj commented Apr 24, 2023

Update: I played around with Cloud Run jobs Terraform resource.
It works good but there is a dependency on a container image presence in Artifact Registry - job creation fails, when there is no image in Artifact Registry. That is the case during the Terraform run.

Option 1 : Use Artifact Registry remote repository

In this option, the new Artifact Regsitry remote repositories feature will be used. It will allow to avoid any manual tasks of moving tool's image to the Artifact Registry. The remote repo will proxy / cache the tool's repo from Github. The only problem is that, for now, remote repos support only docker hub as an upstream.

Option 2: Run scrip that moves image as Terraform local-exec resource

In this option, we run script that copies tool's image to Artifact Registry as a Terraform resource. Then we create CloudRun jobs. I'm not a big fan of running scripts from the Terraform however, but we will avoid script step.

I think that #option 1 is the future direction once Artifact Registry will be ready.
Im' just not sure if we should move script to Terraform or stay as it is for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants