Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Jinja, Cloud Deployment Manager, and Cloud Source Repository file links

We are attempting to use Jinja + Cloud Deployment Manager + Cloud Source Repository.

This involves files hosted within CSR. However, it appears that the system is coded such that it's mandatory one places the referenced files within Cloud Storage in a bucket, versus simply using a valid permitted link.

Below is a segment of the error we're getting. I've bolded the item that makes me believe it's hard coded to make storage buckets mandatory. Has anyone dealt with this issue? Our current solutions are to use something else, or to set up a Cloud Function that triggers off BigQuery audit logs when CSR files are modified and copies the modified files into a storage bucket that is our actual referenced location in Jinja.

Thank you for your time.

 

code: RESOURCE_ERROR
location: /deployments/<location>/resources/<Location>
message: ‘{“ResourceType”:“gcp-types/appengine-v1:apps.services.versions”,“ResourceErrorCode”:“400",“ResourceErrorMessage”:{“code”:400,“message”:“The
request is invalid.“,”status”:“INVALID_ARGUMENT”,“details”:[{“@type”:“type.googleapis.com/google.rpc.BadRequest”,“fieldViolations”:[{“field”:“version.deployment.files.source_url”,“description”:“URL
must be of the form http(s)://storage.googleapis.com/<bucket>/<object>.“}]}],“statusMessage”:“Bad
Request”,“requestPath”:“https://appengine.googleapis.com/v1/apps/<PROJECT>/services/default/versions”,“httpMethod”:“POST”}}’

 

Solved Solved
0 1 443
1 ACCEPTED SOLUTION

For those that may stumble upon this issue in the future and find this question:

So it seems the workaround for this particular item is to set up a Cloud Build trigger that replicates the files where they need to exist. Less work than a Cloud Function, but similar in the solution.

My hope is that Google exposes the CSR bucket in the future so those files can be referenced directly, similarly to how they expose Cloud Functions.

View solution in original post

1 REPLY 1

For those that may stumble upon this issue in the future and find this question:

So it seems the workaround for this particular item is to set up a Cloud Build trigger that replicates the files where they need to exist. Less work than a Cloud Function, but similar in the solution.

My hope is that Google exposes the CSR bucket in the future so those files can be referenced directly, similarly to how they expose Cloud Functions.