Hacker News new | ask | show | jobs
by nknealk 974 days ago
Can you please update the terraform docs for google batch? In [1] it’s really difficult to know what everything in the json configuration is under the base64encode() call. What levers can I pull? How do I run something more complex than hello world? Do I need my CICD to upload scripts to GCS and have the instance download them at runtime and hardcode that path into the batch script?

[1] https://cloud.google.com/batch/docs/create-run-job-using-ter...

1 comments

It seems as though Google Batch does not have a native Terraform resource. The document in [1] seems like a workaround that leverages the Cloud Scheduler Terraform resource, but submit a job using the JSON configuration. The various fields that can be used in the JSON are within [2]. Regarding using GCS there is an example in [3]. I found more samples in [4]

[2] https://cloud.google.com/batch/docs/reference/rest/v1/projec... [3] https://cloud.google.com/batch/docs/create-run-job-storage#u... [4] https://github.com/GoogleCloudPlatform/batch-samples/tree/ma...