1
votes

Our company policy requires the policy contraint "compute.requireShieldedVm" to be enabled. However, when running a Cloud Dataflow job, it is failing to create a worker with the error :

Constraint constraints/compute.requireShieldedVm violated for project projects/********. The boot disk's 'initialize_params.source_image' field specifies a non-Shielded image: projects/dataflow-service-producer-prod/global/images/dataflow-dataflow-owned-resource-20200216-22-rc00. See https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints for more information."

Is there any way when running a Dataflow job to request that a ShieldedVm be used for the worker compute?

1
Not terribly helpful, but here is the issue tracker for tracking this issue: issuetracker.google.com/issues/156442870 - nomadic_squirrel

1 Answers

1
votes

It is not possible to provide a custom image as there is no such parameter that one can provide during job submission as can be seen here Job Submission Parameters

Alternatively, if you are running a Python based dataflow job you can setup the environment through setup files. An example of which can be found here Dataflow - Custom Python Package Environment