Warm tip:
This article is reproduced from serverfault.com, please click
Using GCP DLP with DataFusion, unable to find template
发布于 2021-03-22 20:20:14
I have created a DLP Identification template named DLPTest in Project X.
My Datafusion resources are hosted in Project Y.
Issue is when I use the Redact plugin in Datafusion, and provide the template ID or path in the form -
projects/X/locations/{LOCATION}/inspectTemplates/DLPTest or
projects/X/inspectTemplates/DLPTest
All permissions have been provided to datafusion SA, compute engine SA, DLP Service Account. Datafusion fails to find the template, as it keeps searching for template in Project Y.
> Error logs -
> Caused by:com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Invalid path:
Datafusion is expecting template in location projects/Y/inspectTemplates/projects/DLPTest
How do I enable DF to look for template in the correct location in separate project? Thanks.
They didn't say they got a permission error, they got an error from data fusion. Datafusion is expecting template in location projects/Y/inspectTemplates/projects/DLPTest. This sounds like a bug, I'll check in with them on it.
@JordannaChord Yes it is not a permission error, I just posted the steps if ever they somewhat missed this. Also if "Project ID" is set to auto-detect it will be pointed to Project Y by default, changing the value to Project X should point to location projects/X/inspectTemplates/projects/DLPTest.
As mentioned by Ricco, it was more to do with the project permission and setup. Steps provided solved the issue. Additionally DLP needs enabled for project hosting datafusion, i.e. Project Y as well. I did have issues with regional DLP template(though all resources in same region), but global DLP template worked fine.