GoogleCloudPlatform / terraform-google-cloud-run

Deploys apps to Cloud Run, along with option to map custom domain
https://registry.terraform.io/modules/GoogleCloudPlatform/cloud-run/google
Apache License 2.0
131 stars 81 forks source link

(job-exec) Terracurl limitations #196

Closed tanguynicolas closed 2 months ago

tanguynicolas commented 2 months ago

Hello,

I find the use of Terracurl a little limiting. I have a case where I need to wait for the job to fully complete its work before creating another resource.

So instead I use the gcloud module like this (with --wait):

module "gcloud" {
  source  = "terraform-google-modules/gcloud/google"
  version = "~> 3.4"

  platform = "linux"

  create_cmd_entrypoint  = "gcloud"
  create_cmd_body        = "run jobs execute --project=<project_id> --region=<location> <job_name> --wait"

  depends_on = [ module.cloud_run_job ]
}

Is there any particular reason to use a direct HTTP request rather than the gcloud module, which seems to be better in terms of functionality and code simplicity?

Would you be interested in a merge request?

bharathkkb commented 2 months ago

Hi @tanguynicolas terracurl was specifically chosen as we didn't want to take dependency on gcloud being installed in the system that is executing TF